Skip to content

Conversation

@srmukher
Copy link
Contributor

No description provided.

@srmukher srmukher requested a review from a team as a code owner December 30, 2025 06:39
@srmukher
Copy link
Contributor Author

srmukher commented Dec 30, 2025

@github-actions
Copy link

github-actions bot commented Dec 30, 2025

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-charts
AreaChart
404.512 kB
123.769 kB
405.615 kB
124.12 kB
1.103 kB
351 B
react-charts
DeclarativeChart
724.258 kB
210.073 kB
734.138 kB
213.808 kB
9.88 kB
3.735 kB
react-charts
DonutChart
299.158 kB
89.227 kB
331.221 kB
101.436 kB
32.063 kB
12.209 kB
react-charts
GanttChart
387.634 kB
117.484 kB
388.737 kB
117.926 kB
1.103 kB
442 B
react-charts
GroupedVerticalBarChart
395.514 kB
120.079 kB
396.617 kB
120.517 kB
1.103 kB
438 B
react-charts
HeatMapChart
389.749 kB
119.192 kB
390.852 kB
119.564 kB
1.103 kB
372 B
react-charts
LineChart
415.004 kB
125.838 kB
416.107 kB
126.233 kB
1.103 kB
395 B
react-charts
ScatterChart
394.916 kB
119.97 kB
396.019 kB
120.41 kB
1.103 kB
440 B
react-charts
VerticalBarChart
429.218 kB
125.201 kB
430.321 kB
125.619 kB
1.103 kB
418 B
react-charts
VerticalStackedBarChart
401.564 kB
121.043 kB
402.667 kB
121.399 kB
1.103 kB
356 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-charts
FunnelChart
290.413 kB
86.075 kB
react-charts
GaugeChart
314.067 kB
92.925 kB
react-charts
HorizontalBarChart
296.747 kB
87.108 kB
react-charts
HorizontalBarChartWithAxis
63 B
83 B
react-charts
Legends
235.853 kB
69.476 kB
react-charts
SankeyChart
199.54 kB
61.375 kB
react-charts
Sparkline
91.393 kB
28.708 kB
🤖 This report was generated against 5e6a10bd426a23459c62da97bb5f7d55534e027e

@github-actions
Copy link

Pull request demo site: URL


const padding = context.viewportPadding;
const paddingLeft =
typeof padding?.left === 'number' && Number.isFinite(padding.left) && padding.left > 0 ? padding.left : 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reduce repeating code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

? context.plotRect
: undefined;

const clampX = clampRect && typeof clampRect.x === 'number' && Number.isFinite(clampRect.x) ? clampRect.x : 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clampX clampY both values are very similar and repeating part of the code. See how we can reduce common code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@srmukher srmukher force-pushed the users/srmukher/v9_donut_anno branch 3 times, most recently from 75c16d7 to a63a35d Compare January 5, 2026 10:40
@srmukher srmukher force-pushed the users/srmukher/v9_donut_anno branch from a63a35d to 0a02ca0 Compare January 5, 2026 10:52
@srmukher srmukher force-pushed the users/srmukher/v9_donut_anno branch from 0b97f45 to 3b7be6e Compare January 6, 2026 09:33
return React.useMemo<UseDonutAnnotationLayoutResult>(() => {
const annotationList = annotations ?? EMPTY_ANNOTATIONS;
const layout = resolveDonutViewportLayout(annotationList, width, height, hideLabels);
const fallbackSvgWidth = typeof width === 'number' && Number.isFinite(width) ? Math.max(width, 0) : 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is any of the code in this file sharable with chart annotation layer.

const desiredWidth = Math.max(resolvedSvgWidth + totalHorizontalPadding, 0);
const desiredHeight = Math.max(resolvedSvgHeight + totalVerticalPadding, 0);

if (typeof width === 'number' && Number.isFinite(width)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typeof width

I see lot of code repeating for width and height

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants