@fluentui/react-charting 5.24.34 → 5.24.36

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.
@@ -720,6 +720,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
720
720
  var mode = 'tonexty';
721
721
  var _g = getLegendProps(input.data, input.layout, isMultiPlot), legends = _g.legends, hideLegend = _g.hideLegend;
722
722
  var yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
723
+ var shouldWrapLabels = false;
723
724
  var chartData = input.data
724
725
  .map(function (series, index) {
725
726
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
@@ -735,6 +736,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
735
736
  var isXDate = (0, chart_utilities_1.isDateArray)(xValues);
736
737
  var isXNumber = (0, chart_utilities_1.isNumberArray)(xValues);
737
738
  var isXYearCategory = (0, chart_utilities_1.isYearArray)(series.x); // Consider year as categorical not numeric continuous axis
739
+ shouldWrapLabels = shouldWrapLabels || (isXString && !isXDate);
738
740
  var legend = legends[index];
739
741
  // resolve color for each legend's lines from the extracted colors
740
742
  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);
@@ -815,7 +817,7 @@ define(["require", "exports", "tslib", "d3-array", "d3-scale", "d3-format", "../
815
817
  var scatterChartProps = {
816
818
  scatterChartData: chartData,
817
819
  };
818
- 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));
820
+ 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));
819
821
  if (isAreaChart) {
820
822
  return tslib_1.__assign({ data: chartProps, mode: mode }, commonProps);
821
823
  }