Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Marker size issue in scatter chart and line chart",
"packageName": "@fluentui/react-charts",
"email": "yushsingla@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ const bisect = bisector((d: any) => d.x).left;
const DEFAULT_LINE_STROKE_SIZE = 4;
Copy link

@github-actions github-actions bot Jan 27, 2026

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/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask.normal.chromium.png 5 Changed
vr-tests-react-components/Charts-DonutChart 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png 5570 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 49 Changed
vr-tests-react-components/Positioning.Positioning end.chromium.png 731 Changed
vr-tests-react-components/Skeleton converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Skeleton converged.Opaque Skeleton with square - Dark Mode.default.chromium.png 3 Changed
vr-tests-react-components/TagPicker 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png 1319 Changed

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

// The given shape of a icon must be 2.5 times bigger than line width (known as stroke width)
const PATH_MULTIPLY_SIZE = 2.5;
// Scale factor to reduce marker sizes (0.6 = 60% of calculated size)
const MARKER_SIZE_SCALE_FACTOR = 0.6;
Copy link
Contributor

Choose a reason for hiding this comment

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

how did you come up with 0.6 scale factor


/**
*
Expand Down Expand Up @@ -549,7 +551,7 @@ export const LineChart: React.FunctionComponent<LineChartProps> = React.forwardR
xScaleType: props.xScaleType,
yScaleType: props.yScaleType,
secondaryYScaleType: props.secondaryYScaleType,
})
}) * MARKER_SIZE_SCALE_FACTOR
: 0;
if (_points[i].data.length === 1) {
const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ import { useImageExport } from '../../utilities/hooks';

type NumericAxis = D3Axis<number | { valueOf(): number }>;

// Scale factor to reduce marker sizes (0.6 = 60% of calculated size)
const MARKER_SIZE_SCALE_FACTOR = 0.6;

type ScatterChartDataWithIndex = ScatterChartPoints & { index: number };

// Create a ScatterChart variant which uses these default styles and this styled subcomponent.
Expand Down Expand Up @@ -421,7 +424,7 @@ export const ScatterChart: React.FunctionComponent<ScatterChartProps> = React.fo

if (pointMarkerSize) {
if (isContinuousXY && maxMarkerSize !== 0) {
circleRadius = (pointMarkerSize * extraMaxPixels) / maxMarkerSize;
circleRadius = (pointMarkerSize * extraMaxPixels * MARKER_SIZE_SCALE_FACTOR) / maxMarkerSize;
} else if (!isContinuousXY && maxMarkerSize !== minMarkerSize) {
circleRadius =
minPixel + ((pointMarkerSize - minMarkerSize) / (maxMarkerSize - minMarkerSize)) * (maxPixel - minPixel);
Expand Down