Skip to content

Commit 17fd271

Browse files
authored
refactor(react-charting): set max-width for heatmap callout without using subComponentStyles (#34992)
1 parent 5c53634 commit 17fd271

File tree

7 files changed

+13442
-13429
lines changed

7 files changed

+13442
-13429
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "refactor: set max-width for heatmap callout without using subComponentStyles",
4+
"packageName": "@fluentui/react-charting",
5+
"email": "[email protected]",
6+
"dependentChangeType": "patch"
7+
}

packages/charts/react-charting/etc/react-charting.api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -913,8 +913,8 @@ export interface IHeatMapChartStyles {
913913
root?: IStyle;
914914
// (undocumented)
915915
subComponentStyles: {
916-
cartesianStyles: IStyleFunctionOrObject<ICartesianChartStyleProps, ICartesianChartStyles>;
917-
calloutStyles: IStyleFunctionOrObject<ICalloutContentStyleProps, ICalloutContentStyles>;
916+
cartesianStyles?: IStyleFunctionOrObject<ICartesianChartStyleProps, ICartesianChartStyles>;
917+
calloutStyles?: IStyleFunctionOrObject<ICalloutContentStyleProps, ICalloutContentStyles>;
918918
};
919919
// (undocumented)
920920
text?: IStyle;

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ const ResponsiveVerticalStackedBarChart = withResponsiveContainer(VerticalStacke
5454
const ResponsiveLineChart = withResponsiveContainer(LineChart);
5555
const ResponsiveHorizontalBarChartWithAxis = withResponsiveContainer(HorizontalBarChartWithAxis);
5656
const ResponsiveAreaChart = withResponsiveContainer(AreaChart);
57+
const ResponsiveHeatMapChart = withResponsiveContainer(HeatMapChart);
5758
const ResponsiveSankeyChart = withResponsiveContainer(SankeyChart);
5859
const ResponsiveGaugeChart = withResponsiveContainer(GaugeChart);
5960
const ResponsiveGroupedVerticalBarChart = withResponsiveContainer(GroupedVerticalBarChart);
@@ -195,7 +196,7 @@ type ChartTypeMap = {
195196
} & PreTransformHooks;
196197
heatmap: {
197198
transformer: typeof transformPlotlyJsonToHeatmapProps;
198-
renderer: typeof HeatMapChart;
199+
renderer: typeof ResponsiveHeatMapChart;
199200
} & PreTransformHooks;
200201
gauge: {
201202
transformer: typeof transformPlotlyJsonToGaugeProps;
@@ -262,7 +263,7 @@ const chartMap: ChartTypeMap = {
262263
},
263264
heatmap: {
264265
transformer: transformPlotlyJsonToHeatmapProps,
265-
renderer: HeatMapChart,
266+
renderer: ResponsiveHeatMapChart,
266267
},
267268
gauge: {
268269
transformer: transformPlotlyJsonToGaugeProps,

0 commit comments

Comments
 (0)