[Fix]: Markers are too big in LineChart and ScatterChart #35699
Open
singlayush wants to merge 13 commits intomicrosoft:masterfrom
Open
[Fix]: Markers are too big in LineChart and ScatterChart #35699singlayush wants to merge 13 commits intomicrosoft:masterfrom
singlayush wants to merge 13 commits intomicrosoft:masterfrom
Conversation
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
packages/charts/react-charts/library/src/components/LineChart/LineChart.tsx
Show resolved
Hide resolved
AtishayMsft
reviewed
Jan 27, 2026
packages/charts/react-charts/library/src/components/LineChart/LineChart.tsx
Outdated
Show resolved
Hide resolved
…yushsingla/marker-bug
…ushsingla/marker-bug
|
@singlayush please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
krkshitij
reviewed
Feb 3, 2026
packages/charts/react-charts/library/src/components/LineChart/LineChart.tsx
Outdated
Show resolved
Hide resolved
packages/charts/react-charts/library/src/components/LineChart/LineChart.tsx
Show resolved
Hide resolved
AtishayMsft
reviewed
Feb 12, 2026
packages/charts/react-charts/library/src/components/LineChart/LineChart.tsx
Show resolved
Hide resolved
AtishayMsft
reviewed
Feb 12, 2026
AtishayMsft
reviewed
Feb 12, 2026
| activeRadius?: number; | ||
| minRadius?: number; | ||
| }): number => { | ||
| const minPixel = 4; |
AtishayMsft
reviewed
Feb 12, 2026
packages/charts/react-charts/library/src/utilities/utilities.ts
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix marker sizing in LineChart and ScatterChart
Problem
Markers in LineChart and ScatterChart were rendering too large compared to expected behavior (e.g., Plotly). The previous formula
(markerSize * extraMaxPixels) / maxMarkerSizewould essentially result in scaling markers based on the extraMaxPixels. But we would only want to scale down and not scale up. The scaling down is needed to ensure there is no overflow out of the chart, while scaling up serves no purpose and results in too big markers.Solution
Updated the marker radius calculation to use conditional logic:
Logic:
extraMaxPixels > maxMarkerSize: Use the actualmarkerSizedirectly (enough space available)Test Run: https://github.com/microsoft/fluentui-charting-contrib/actions/runs/21618414015
Examples
Changes
Screenshots
Before
Before
Plotly
Before
Testing