@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.
@@ -716,6 +716,7 @@ var transformPlotlyJsonToScatterTraceProps = function (input, isMultiPlot, chart
716
716
  var mode = 'tonexty';
717
717
  var _g = getLegendProps(input.data, input.layout, isMultiPlot), legends = _g.legends, hideLegend = _g.hideLegend;
718
718
  var yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
719
+ var shouldWrapLabels = false;
719
720
  var chartData = input.data
720
721
  .map(function (series, index) {
721
722
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -731,6 +732,7 @@ var transformPlotlyJsonToScatterTraceProps = function (input, isMultiPlot, chart
731
732
  var isXDate = isDateArray(xValues);
732
733
  var isXNumber = isNumberArray(xValues);
733
734
  var isXYearCategory = isYearArray(series.x); // Consider year as categorical not numeric continuous axis
735
+ shouldWrapLabels = shouldWrapLabels || (isXString && !isXDate);
734
736
  var legend = legends[index];
735
737
  // resolve color for each legend's lines from the extracted colors
736
738
  var seriesColor = 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);
@@ -811,7 +813,7 @@ var transformPlotlyJsonToScatterTraceProps = function (input, isMultiPlot, chart
811
813
  var scatterChartProps = {
812
814
  scatterChartData: chartData,
813
815
  };
814
- var commonProps = __assign(__assign(__assign(__assign(__assign(__assign(__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));
816
+ var commonProps = __assign(__assign(__assign(__assign(__assign(__assign(__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));
815
817
  if (isAreaChart) {
816
818
  return __assign({ data: chartProps, mode: mode }, commonProps);
817
819
  }