chore: format files using prettier (#7364)

* chore: format files using prettier

* chore: api server files formatted
This commit is contained in:
sriram veeraghanta 2025-07-08 20:41:11 +05:30 committed by GitHub
parent 0225d806cc
commit 6ce700fd5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
149 changed files with 1518 additions and 919 deletions

View file

@ -15,16 +15,16 @@ export const getLegendProps = (args: TChartLegend): LegendProps => {
overflow: "hidden",
...(layout === "vertical"
? {
top: 0,
alignItems: "center",
height: "100%",
}
top: 0,
alignItems: "center",
height: "100%",
}
: {
left: 0,
bottom: 0,
width: "100%",
justifyContent: "center",
}),
left: 0,
bottom: 0,
width: "100%",
justifyContent: "center",
}),
...args.wrapperStyles,
},
content: <CustomLegend {...args} />,
@ -34,8 +34,8 @@ export const getLegendProps = (args: TChartLegend): LegendProps => {
const CustomLegend = React.forwardRef<
HTMLDivElement,
React.ComponentProps<"div"> &
Pick<LegendProps, "payload" | "formatter" | "onClick" | "onMouseEnter" | "onMouseLeave"> &
TChartLegend
Pick<LegendProps, "payload" | "formatter" | "onClick" | "onMouseEnter" | "onMouseLeave"> &
TChartLegend
>((props, ref) => {
const { formatter, layout, onClick, onMouseEnter, onMouseLeave, payload } = props;

View file

@ -23,25 +23,23 @@ export const CustomYAxisTick = React.memo<any>(({ x, y, payload }: any) => (
CustomYAxisTick.displayName = "CustomYAxisTick";
export const CustomRadarAxisTick = React.memo<any>(
({ x, y, payload, getLabel, cx, cy, offset = 16 }: any) => {
// Calculate direction vector from center to tick
const dx = x - cx;
const dy = y - cy;
// Normalize and apply offset
const length = Math.sqrt(dx * dx + dy * dy);
const normX = dx / length;
const normY = dy / length;
const labelX = x + normX * offset;
const labelY = y + normY * offset;
export const CustomRadarAxisTick = React.memo<any>(({ x, y, payload, getLabel, cx, cy, offset = 16 }: any) => {
// Calculate direction vector from center to tick
const dx = x - cx;
const dy = y - cy;
// Normalize and apply offset
const length = Math.sqrt(dx * dx + dy * dy);
const normX = dx / length;
const normY = dy / length;
const labelX = x + normX * offset;
const labelY = y + normY * offset;
return (
<g transform={`translate(${labelX},${labelY})`}>
<text y={0} textAnchor="middle" className={AXIS_TICK_CLASSNAME}>
{getLabel ? getLabel(payload.value) : payload.value}
</text>
</g>
);
}
);
return (
<g transform={`translate(${labelX},${labelY})`}>
<text y={0} textAnchor="middle" className={AXIS_TICK_CLASSNAME}>
{getLabel ? getLabel(payload.value) : payload.value}
</text>
</g>
);
});
CustomRadarAxisTick.displayName = "CustomRadarAxisTick";

View file

@ -1 +1 @@
export * from "./root";
export * from "./root";

View file

@ -1 +1 @@
export * from "./root";
export * from "./root";

View file

@ -156,4 +156,4 @@ export const ScatterChart = React.memo(<K extends string, T extends string>(prop
</div>
);
});
ScatterChart.displayName = "ScatterChart";
ScatterChart.displayName = "ScatterChart";

View file

@ -252,8 +252,8 @@ export const CustomTreeMapContent: React.FC<any> = ({
{bottom.labelTruncated
? truncateText(
label,
availableTextWidth - calculateContentWidth(value, LAYOUT.TEXT.FONT_SIZES.SM) - 4,
LAYOUT.TEXT.FONT_SIZES.SM
availableTextWidth - calculateContentWidth(value, LAYOUT.TEXT.FONT_SIZES.SM) - 4,
LAYOUT.TEXT.FONT_SIZES.SM
)
: label}
</tspan>