You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(charts): honor ChartAxis.stepSize, ChartConfig.description and .height (framework#3752) (#2888)
The tail of the declared-≠-delivered sweep from #2880 / framework#3729. Three
ChartConfig props reached the renderer and did nothing.
stepSize: Recharts has no "a tick every N units" prop — tickCount is a hint it
may ignore and interval is for categorical axes — so honoring a step means
handing it the tick array outright. ticksFor builds it from the axis's own
min/max where declared and from the plotted values otherwise. A data-derived
max rounds UP to the next step (otherwise the topmost bar sits above the last
gridline and the axis reads as truncated); an explicit max clamps instead,
since a tick outside a pinned domain would be drawn outside the plot. The
step-count division carries a small epsilon because 0.5/0.1 is
5.000000000000001 one way and 4.999999999999999 the other, and a bare floor()
drops a whole tick in the second case. More than 200 ticks is refused rather
than rendered.
description: the accessibility description. A chart is a picture to a screen
reader; the container now carries role="img" + aria-label. Without a
description it stays an ordinary div, because stamping role="img" on an
unlabelled graphic is worse than leaving one a screen reader can skip.
height: was read only by the legacy ChartBarRenderer, not by the advanced path
that draws every real chart. Now an inline style on the chart container, which
beats its default h-[350px] class.
height and description ride on the shared container props, so they apply to all
eight chart families rather than one branch.
ChartInteraction.zoom and .clickAction are removed from the schema in the
framework companion rather than implemented here — brush already narrows a
range, and a segment click already has two working owners (drillDown,
onSegmentClick).
0 commit comments