@fluentui/react-charts 9.3.0 → 9.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -2
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +3 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +3 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/package.json +9 -9
|
@@ -796,6 +796,7 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
796
796
|
let mode = 'tonexty';
|
|
797
797
|
const { legends, hideLegend } = getLegendProps(input.data, input.layout, isMultiPlot);
|
|
798
798
|
const yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
|
|
799
|
+
var shouldWrapLabels = false;
|
|
799
800
|
const chartData = input.data.map((series, index)=>{
|
|
800
801
|
var _series_mode, _series_line, _series_marker, _series_line1, _input_layout_template_layout, _input_layout_template, _input_layout, _series_mode1;
|
|
801
802
|
const colors = isScatterMarkers ? (series === null || series === void 0 ? void 0 : (_series_mode = series.mode) === null || _series_mode === void 0 ? void 0 : _series_mode.includes('line')) ? (_series_line = series.line) === null || _series_line === void 0 ? void 0 : _series_line.color : (_series_marker = series.marker) === null || _series_marker === void 0 ? void 0 : _series_marker.color : (_series_line1 = series.line) === null || _series_line1 === void 0 ? void 0 : _series_line1.color;
|
|
@@ -806,6 +807,7 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
806
807
|
const isXDate = (0, _chartutilities.isDateArray)(xValues);
|
|
807
808
|
const isXNumber = (0, _chartutilities.isNumberArray)(xValues);
|
|
808
809
|
const isXYearCategory = (0, _chartutilities.isYearArray)(series.x); // Consider year as categorical not numeric continuous axis
|
|
810
|
+
shouldWrapLabels = shouldWrapLabels || isXString && !isXDate;
|
|
809
811
|
const legend = legends[index];
|
|
810
812
|
// resolve color for each legend's lines from the extracted colors
|
|
811
813
|
const seriesColor = (0, _PlotlyColorAdapter.resolveColor)(extractedColors, index, legend, colorMap, isDarkTheme);
|
|
@@ -882,6 +884,7 @@ const transformPlotlyJsonToScatterTraceProps = (input, isMultiPlot, chartType, c
|
|
|
882
884
|
hideTickOverlap: true,
|
|
883
885
|
hideLegend,
|
|
884
886
|
useUTC: false,
|
|
887
|
+
wrapXAxisLables: shouldWrapLabels,
|
|
885
888
|
optimizeLargeData: numDataPoints > 1000,
|
|
886
889
|
...getTitles(input.layout),
|
|
887
890
|
...getXAxisTickFormat(input.data[0], input.layout),
|