diff --git a/change/@fluentui-react-charting-558ce73b-bb6f-475f-be32-1aa78f0663a0.json b/change/@fluentui-react-charting-558ce73b-bb6f-475f-be32-1aa78f0663a0.json new file mode 100644 index 0000000000000..606946386a527 --- /dev/null +++ b/change/@fluentui-react-charting-558ce73b-bb6f-475f-be32-1aa78f0663a0.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Added scale factor to minimum height logic", + "packageName": "@fluentui/react-charting", + "email": "shubhabrata08@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/react-charting/src/components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx b/packages/react-charting/src/components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx index 3b4ac0c6d637f..5984faffac9f0 100644 --- a/packages/react-charting/src/components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx +++ b/packages/react-charting/src/components/VerticalStackedBarChart/VerticalStackedBarChart.base.tsx @@ -790,8 +790,8 @@ export class VerticalStackedBarChartBase extends React.Component< }; let barHeight = heightValueScale * point.data; - if (barHeight < Math.max(Math.ceil(this._yMax / 100.0), barMinimumHeight)) { - barHeight = Math.max(Math.ceil(this._yMax / 100.0), barMinimumHeight); + if (barHeight < Math.max(heightValueScale * Math.ceil(this._yMax / 100.0), barMinimumHeight)) { + barHeight = Math.max(heightValueScale * Math.ceil(this._yMax / 100.0), barMinimumHeight); } yPoint = yPoint - barHeight - (index ? gapHeight : 0); barTotalValue += point.data;