@fluentui/react-charting 5.24.8 → 5.24.9

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.
Files changed (28) hide show
  1. package/CHANGELOG.json +22 -1
  2. package/CHANGELOG.md +12 -2
  3. package/dist/react-charting.d.ts +1 -1
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +1 -1
  7. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +3 -2
  8. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  9. package/lib/components/LineChart/LineChart.base.d.ts +2 -0
  10. package/lib/components/LineChart/LineChart.base.js +65 -51
  11. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  12. package/lib/types/IDataPoint.d.ts +1 -1
  13. package/lib/types/IDataPoint.js.map +1 -1
  14. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +3 -2
  15. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  16. package/lib-amd/components/LineChart/LineChart.base.d.ts +2 -0
  17. package/lib-amd/components/LineChart/LineChart.base.js +65 -51
  18. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  19. package/lib-amd/types/IDataPoint.d.ts +1 -1
  20. package/lib-amd/types/IDataPoint.js.map +1 -1
  21. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +3 -2
  22. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  23. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +2 -0
  24. package/lib-commonjs/components/LineChart/LineChart.base.js +65 -51
  25. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  26. package/lib-commonjs/types/IDataPoint.d.ts +1 -1
  27. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  28. package/package.json +2 -2
@@ -1051,7 +1051,7 @@ export interface ILineChartLineOptions extends React_2.SVGProps<SVGPathElement>
1051
1051
  curve?: 'linear' | 'natural' | 'step' | 'stepAfter' | 'stepBefore' | CurveFactory;
1052
1052
  lineBorderColor?: string;
1053
1053
  lineBorderWidth?: string | number;
1054
- mode?: 'lines' | 'markers' | 'text' | 'lines+markers' | 'text+markers' | 'text+lines' | 'text+lines+markers' | 'none' | 'gauge' | 'number' | 'delta' | 'number+delta' | 'gauge+number' | 'gauge+number+delta' | 'gauge+delta' | 'markers+text';
1054
+ mode?: 'lines' | 'markers' | 'text' | 'lines+markers' | 'text+markers' | 'text+lines' | 'text+lines+markers' | 'none' | 'gauge' | 'number' | 'delta' | 'number+delta' | 'gauge+number' | 'gauge+number+delta' | 'gauge+delta' | 'markers+text' | 'lines+text';
1055
1055
  strokeDasharray?: string | number;
1056
1056
  strokeDashoffset?: string | number;
1057
1057
  strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
@@ -496,7 +496,7 @@ var transformPlotlyJsonToScatterTraceProps = function (input, isMultiPlot, chart
496
496
  var yAxisTickFormat = getYAxisTickFormat(input.data[0], input.layout);
497
497
  var chartData = input.data
498
498
  .map(function (series, index) {
499
- var _a, _b, _c, _d, _e, _f, _g;
499
+ var _a, _b, _c, _d, _e, _f, _g, _h;
500
500
  var colors = isScatterMarkers
501
501
  ? ((_a = series === null || series === void 0 ? void 0 : series.mode) === null || _a === void 0 ? void 0 : _a.includes('line'))
502
502
  ? (_b = series.line) === null || _b === void 0 ? void 0 : _b.color
@@ -514,7 +514,8 @@ var transformPlotlyJsonToScatterTraceProps = function (input, isMultiPlot, chart
514
514
  var seriesColor = resolveColor(extractedColors, index, legend, colorMap, isDarkTheme);
515
515
  var seriesOpacity = getOpacity(series, index);
516
516
  mode = series.fill === 'tozeroy' ? 'tozeroy' : 'tonexty';
517
- var lineOptions = getLineOptions(series.line);
517
+ // if mode contains 'text', we prioritize showing the text over curving the line
518
+ var lineOptions = !((_h = series.mode) === null || _h === void 0 ? void 0 : _h.includes('text')) ? getLineOptions(series.line) : undefined;
518
519
  var legendShape = getLegendShape(series);
519
520
  var validXYRanges = getValidXYRanges(series);
520
521
  return validXYRanges.map(function (_a, rangeIdx) {