Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(react-charting): use legend data and config from Legends component for image export #33847

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

krkshitij
Copy link
Contributor

@krkshitij krkshitij commented Feb 15, 2025

This PR addresses the following issues:

  • Duplicate legends appearing in images exported immediately after a legend selection change
  • Text and legends not appearing correctly in RTL layout
  • Legends being center-aligned, even for cartesian charts

Previous Behavior

LTR

converted-image (8)
converted-image (9)

RTL

converted-image (10)
converted-image (11)

New Behavior

LTR

converted-image (12)
converted-image (13)

RTL

converted-image (14)
converted-image (15)

Copy link

github-actions bot commented Feb 15, 2025

📊 Bundle size report

✅ No changes found

Copy link

Pull request demo site: URL

@AtishayMsft AtishayMsft requested a review from Copilot February 15, 2025 11:47

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 19 changed files in this pull request and generated no comments.

Files not reviewed (14)
  • packages/charts/react-charting/src/index.ts: Evaluated as low risk
  • packages/charts/react-charting/src/components/Legends/Legends.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/GaugeChart/GaugeChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/LineChart/LineChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/DeclarativeChart/index.ts: Evaluated as low risk
  • packages/charts/react-charting/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/VerticalBarChart/VerticalBarChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/SankeyChart/SankeyChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/AreaChart/AreaChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/DonutChart/DonutChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/components/HeatMapChart/HeatMapChart.base.tsx: Evaluated as low risk
  • packages/charts/react-charting/src/utilities/image-export-utils.ts: Evaluated as low risk
Comments suppressed due to low confidence (1)

packages/charts/react-charting/src/components/DeclarativeChart/DeclarativeChart.tsx:180

  • The error message 'Chart cannot be exported as image' is unclear. It should be updated to 'Chart instance does not support image export functionality'.
return reject(Error('Chart cannot be exported as image'));
@krkshitij krkshitij changed the title [POC 2] Export legend data from charts feat(react-charting): export legend data and config from Legends component Feb 18, 2025
@krkshitij krkshitij marked this pull request as ready for review February 18, 2025 10:54
@krkshitij krkshitij requested a review from a team as a code owner February 18, 2025 10:54
@@ -0,0 +1,7 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual regressions to review in the fluentuiv8 Visual Regression Report

Keytip 1 screenshots
Image Name Diff(in Pixels) Image Type
Keytip.Offset.default.chromium.png 121 Changed
react-charting-HeatMapChart 1 screenshots
Image Name Diff(in Pixels) Image Type
react-charting-HeatMapChart.Basic - RTL.default.chromium.png 372 Changed
react-charting-VerticalBarChart 1 screenshots
Image Name Diff(in Pixels) Image Type
react-charting-VerticalBarChart.Basic - Secondary Y Axis.default.chromium.png 4 Changed

@krkshitij krkshitij changed the title feat(react-charting): export legend data and config from Legends component feat(react-charting): use legend data and config from Legends component for image export Feb 21, 2025
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.

3 participants