Skip to content

feat(react-charts): support custom GaugeChart callouts - #36730

Draft
Atishay Jain (atisjai) (AtishayMsft) wants to merge 3 commits into
microsoft:masterfrom
AtishayMsft:atisjai/gauge-chart-custom-callout
Draft

feat(react-charts): support custom GaugeChart callouts#36730
Atishay Jain (atisjai) (AtishayMsft) wants to merge 3 commits into
microsoft:masterfrom
AtishayMsft:atisjai/gauge-chart-custom-callout

Conversation

@AtishayMsft

@AtishayMsft Atishay Jain (atisjai) (AtishayMsft) commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Previous Behavior

GaugeChart always rendered its built-in callout content. Consumers could style the popover, but could not replace or wrap its content, add domain-specific units, or identify which gauge segment opened the callout.

New Behavior

  • Adds onRenderCallout for replacing or wrapping the default GaugeChart callout.
  • Adds GaugeChartCalloutData with the active legend, chart value, effective minimum and maximum, formatted value, and visible segment values.
  • Supplies the existing renderer as defaultRender so custom content can compose with the standard callout.
  • Adds a GaugeChartCustomCallout Storybook example demonstrating temperature units.

Preview

Open the PR demo site and select Charts / GaugeChart / Gauge Chart Custom Callout.

Validation

  • yarn nx run react-charts:test --testPathPatterns=GaugeChart.test.tsx --runInBand
  • yarn nx run react-charts:lint
  • yarn nx run react-charts-stories:lint

Related Issue(s)

No linked issue; this API addition follows consumer feedback requesting customizable GaugeChart callouts and support for non-percentage units.

@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-charts
DeclarativeChart
758.92 kB
222.705 kB
759.183 kB
222.801 kB
263 B
96 B
react-charts
GaugeChart
317.083 kB
97.402 kB
317.353 kB
97.506 kB
270 B
104 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-charts
AreaChart
406.953 kB
127.197 kB
react-charts
DonutChart
317.733 kB
97.977 kB
react-charts
FunnelChart
309.15 kB
94.777 kB
react-charts
GanttChart
390.066 kB
121.669 kB
react-charts
GroupedVerticalBarChart
398.166 kB
124.459 kB
react-charts
HeatMapChart
392.257 kB
122.713 kB
react-charts
HorizontalBarChart
297.409 kB
90.473 kB
react-charts
HorizontalBarChartWithAxis
63 B
83 B
react-charts
Legends
236.596 kB
71.053 kB
react-charts
LineChart
418.285 kB
130.322 kB
react-charts
PolarChart
345.605 kB
108.011 kB
react-charts
SankeyChart
213.814 kB
68.729 kB
react-charts
ScatterChart
397.609 kB
124.373 kB
react-charts
Sparkline
80.888 kB
26.864 kB
react-charts
VerticalBarChart
434.583 kB
129.345 kB
react-charts
VerticalStackedBarChart
404.164 kB
125.852 kB
🤖 This report was generated against eb4f176f26f3c830817f39b621df488fdb6d7d99

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@AtishayMsft

Copy link
Copy Markdown
Contributor Author

[ReviewAgent] Concern: the description is still the blank template - no previous/new behavior, no linked issue, no screenshot of a custom gauge callout. fill it in so reviewers can judge whether this is the api shape we want.

@@ -0,0 +1,7 @@
{

@github-actions github-actions Bot Sep 13, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Menu 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu.Nested Submenus Small Viewport Flipped.nested menu.chromium.png 718 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 627 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 603 Changed
vr-tests-react-components/ProgressBar converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 50 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 78 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 66 Changed
vr-tests-react-components/TagPicker 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png 658 Changed
vr-tests-react-components/TagPicker.disabled - RTL.disabled input hover.chromium.png 635 Changed

There were 2 duplicate changes discarded. Check the build logs for more information.

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