Skip to content

Commit 150e995

Browse files
committed
unused vars
1 parent f7daee9 commit 150e995

5 files changed

Lines changed: 7 additions & 10 deletions

File tree

src/components/server/componentSSR.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ describe("Component SSR — XY Charts", () => {
416416
// The curve must reach the scene serializer: d3's monotone output emits
417417
// cubic Bézier commands whereas the linear path contains only segments.
418418
expect(smooth).not.toBe(linear)
419-
expect(smooth).toMatch(/<path[^>]*d="M[^\"]*C/)
419+
expect(smooth).toMatch(/<path[^>]*d="M[^"]*C/)
420420
})
421421

422422
it("uses StackedAreaChart's monotoneX default when curve is omitted", () => {
@@ -431,7 +431,7 @@ describe("Component SSR — XY Charts", () => {
431431
width: 400,
432432
height: 300,
433433
})
434-
expect(svg).toMatch(/<path[^>]*d="M[^\"]*C/)
434+
expect(svg).toMatch(/<path[^>]*d="M[^"]*C/)
435435
expect(svg).toContain(">A<")
436436
expect(svg).toContain(">B<")
437437
})

src/components/server/serverChartConfigsNetwork.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ export const circlePack: ChartConfig = {
552552
// CirclePack's client style deliberately uses currentColor for the
553553
// subtle dark outline; hierarchy's generic fallback uses the theme
554554
// surface (white), which made SSR visibly diverge.
555-
nodeStyle: common.nodeStyle || ((d: Datum) => ({
555+
nodeStyle: common.nodeStyle || (() => ({
556556
fill: resolveDefaultFill(undefined, themeCategorical, colorScheme, undefined, categoryIndexMap),
557557
fillOpacity: rest.circleOpacity ?? 0.7,
558558
stroke: "currentColor",

src/components/server/serverChartConfigsOrdinal.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ export const gaugeChart: ChartConfig = {
593593
const arcWidth = rest.arcWidth ?? 0.3
594594
const showNeedle = rest.showNeedle !== false
595595
const fillZones = rest.fillZones !== false
596-
const { sweepRad, startAngleDeg } = sweepToAngles(sweep)
596+
const { startAngleDeg } = sweepToAngles(sweep)
597597

598598
const thresholds = rest.thresholds || [{ value: gMax, color: rest.color || "#4e79a7" }]
599599
const gradientFillValue = common.gradientFill as unknown

src/components/server/serverFeatures.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ describe("renderChart", () => {
11541154
})
11551155
expect(svg).toContain('fill="#1f77b4"')
11561156
// The IQR follows the vertical violin's value axis: a constant x.
1157-
expect(svg).toMatch(/<line x1="([^\"]+)" y1="[^\"]+" x2="\1" y2="[^\"]+" stroke="#1f77b4"/)
1157+
expect(svg).toMatch(/<line x1="([^"]+)" y1="[^"]+" x2="\1" y2="[^"]+" stroke="#1f77b4"/)
11581158
})
11591159

11601160
// ── Network Charts ─────────────────────────────────────────────────

src/components/server/staticLegend.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ function computeStaticLegendLayout(config: StaticLegendConfig): StaticLegendMetr
143143
theme,
144144
position = "right",
145145
totalWidth,
146-
totalHeight,
147146
margin,
148147
legendLayout,
149148
} = config
@@ -152,7 +151,6 @@ function computeStaticLegendLayout(config: StaticLegendConfig): StaticLegendMetr
152151
const swatchRadius = 0
153152
const isHorizontal = position === "top" || position === "bottom"
154153
const plotWidth = Math.max(swatchSize, totalWidth - margin.left - margin.right)
155-
const plotHeight = Math.max(rowHeight, totalHeight - margin.top - margin.bottom)
156154
const widths = categories.map((category) => itemWidth(category, swatchSize, labelGap, theme))
157155

158156
if (isHorizontal) {
@@ -224,16 +222,15 @@ export function measureStaticLegend(config: StaticLegendConfig): Omit<StaticLege
224222
}
225223

226224
function computeStaticLegendGroupsLayout(config: StaticLegendGroupsConfig): StaticLegendGroupMetrics {
227-
const { legendGroups, theme, position = "right", totalWidth, totalHeight, margin, legendLayout } = config
228-
const { swatchSize, labelGap, itemGap, rowHeight } = resolveLegendMetrics(legendLayout)
225+
const { legendGroups, theme, position = "right", totalWidth, margin, legendLayout } = config
226+
const { swatchSize, labelGap, rowHeight } = resolveLegendMetrics(legendLayout)
229227
const labelOffset = swatchSize + labelGap
230228
const swatchRadius = 0
231229
const groupLabelSize = Math.max(12, legendFontSize(theme))
232230
const labelPadding = 8
233231
const separatorGap = 12
234232
const isHorizontal = position === "top" || position === "bottom"
235233
const plotWidth = Math.max(swatchSize, totalWidth - margin.left - margin.right)
236-
const plotHeight = Math.max(rowHeight, totalHeight - margin.top - margin.bottom)
237234

238235
if (isHorizontal) {
239236
const maxWidth = Math.max(swatchSize, legendLayout?.maxWidth ?? plotWidth)

0 commit comments

Comments
 (0)