@fluentui/react-charting 5.24.34 → 5.24.35

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.
@@ -731,6 +731,7 @@ var transformPlotlyJsonToScatterTraceProps = function (input, isMultiPlot, chart
731
731
  var mode = 'tonexty';
732
732
  var _g = getLegendProps(input.data, input.layout, isMultiPlot), legends = _g.legends, hideLegend = _g.hideLegend;
733
733
  var yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
734
+ var shouldWrapLabels = false;
734
735
  var chartData = input.data
735
736
  .map(function (series, index) {
736
737
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -746,6 +747,7 @@ var transformPlotlyJsonToScatterTraceProps = function (input, isMultiPlot, chart
746
747
  var isXDate = (0, chart_utilities_1.isDateArray)(xValues);
747
748
  var isXNumber = (0, chart_utilities_1.isNumberArray)(xValues);
748
749
  var isXYearCategory = (0, chart_utilities_1.isYearArray)(series.x); // Consider year as categorical not numeric continuous axis
750
+ shouldWrapLabels = shouldWrapLabels || (isXString && !isXDate);
749
751
  var legend = legends[index];
750
752
  // resolve color for each legend's lines from the extracted colors
751
753
  var seriesColor = (0, PlotlyColorAdapter_1.resolveColor)(extractedColors, index, legend, colorMap, (_k = (_j = (_h = input.layout) === null || _h === void 0 ? void 0 : _h.template) === null || _j === void 0 ? void 0 : _j.layout) === null || _k === void 0 ? void 0 : _k.colorway, isDarkTheme);
@@ -826,7 +828,7 @@ var transformPlotlyJsonToScatterTraceProps = function (input, isMultiPlot, chart
826
828
  var scatterChartProps = {
827
829
  scatterChartData: chartData,
828
830
  };
829
- var commonProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ supportNegativeData: true }, secondaryYAxisValues), { width: (_d = input.layout) === null || _d === void 0 ? void 0 : _d.width, height: (_f = (_e = input.layout) === null || _e === void 0 ? void 0 : _e.height) !== null && _f !== void 0 ? _f : 350, hideTickOverlap: true, hideLegend: hideLegend, useUTC: false, optimizeLargeData: numDataPoints > 1000 }), getTitles(input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getAxisScaleTypeProps(input.data, input.layout)), getAxisTickProps(input.data, input.layout));
831
+ var commonProps = tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ supportNegativeData: true }, secondaryYAxisValues), { width: (_d = input.layout) === null || _d === void 0 ? void 0 : _d.width, height: (_f = (_e = input.layout) === null || _e === void 0 ? void 0 : _e.height) !== null && _f !== void 0 ? _f : 350, hideTickOverlap: true, hideLegend: hideLegend, useUTC: false, optimizeLargeData: numDataPoints > 1000, shouldWrapLabels: shouldWrapLabels }), getTitles(input.layout)), getXAxisTickFormat(input.data[0], input.layout)), yAxisTickFormat), getAxisScaleTypeProps(input.data, input.layout)), getAxisTickProps(input.data, input.layout));
830
832
  if (isAreaChart) {
831
833
  return tslib_1.__assign({ data: chartProps, mode: mode }, commonProps);
832
834
  }