@mui/x-charts 8.11.1 → 8.11.3

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 (141) hide show
  1. package/BarChart/index.d.ts +1 -0
  2. package/BarChart/useBarChartProps.js +4 -3
  3. package/CHANGELOG.md +181 -0
  4. package/ChartsAxisHighlight/ChartsXAxisHighlight.js +4 -4
  5. package/ChartsAxisHighlight/ChartsYAxisHighlight.js +4 -4
  6. package/ChartsLegend/ChartsLegend.js +2 -1
  7. package/ChartsLegend/PiecewiseColorLegend.d.ts +2 -2
  8. package/ChartsLegend/PiecewiseColorLegend.js +32 -22
  9. package/ChartsLegend/piecewiseColorLegendClasses.d.ts +4 -0
  10. package/ChartsLegend/piecewiseColorLegendClasses.js +2 -2
  11. package/ChartsSurface/ChartsSurface.js +2 -1
  12. package/ChartsWrapper/ChartsWrapper.d.ts +4 -0
  13. package/ChartsWrapper/ChartsWrapper.js +73 -25
  14. package/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +8 -0
  15. package/ChartsXAxis/{ChartsGroupedXAxis.js → ChartsGroupedXAxisTicks.js} +11 -54
  16. package/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +10 -0
  17. package/ChartsXAxis/{ChartsSingleXAxis.js → ChartsSingleXAxisTicks.js} +15 -51
  18. package/ChartsXAxis/ChartsXAxis.js +4 -6
  19. package/ChartsXAxis/ChartsXAxisImpl.d.ts +13 -0
  20. package/ChartsXAxis/ChartsXAxisImpl.js +117 -0
  21. package/ChartsXAxis/getVisibleLabels.js +5 -1
  22. package/ChartsXAxis/{useAxisProps.d.ts → useAxisTicksProps.d.ts} +1 -496
  23. package/ChartsXAxis/{useAxisProps.js → useAxisTicksProps.js} +4 -31
  24. package/ChartsXAxis/utilities.d.ts +1 -2
  25. package/ChartsXAxis/utilities.js +1 -7
  26. package/{esm/ChartsYAxis/ChartsGroupedYAxis.d.ts → ChartsYAxis/ChartsGroupedYAxisTicks.d.ts} +2 -2
  27. package/ChartsYAxis/{ChartsGroupedYAxis.js → ChartsGroupedYAxisTicks.js} +11 -54
  28. package/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +10 -0
  29. package/ChartsYAxis/{ChartsSingleYAxis.js → ChartsSingleYAxisTicks.js} +15 -50
  30. package/ChartsYAxis/ChartsYAxis.js +6 -8
  31. package/ChartsYAxis/ChartsYAxisImpl.d.ts +13 -0
  32. package/ChartsYAxis/ChartsYAxisImpl.js +133 -0
  33. package/ChartsYAxis/{useAxisProps.d.ts → useAxisTicksProps.d.ts} +1 -504
  34. package/ChartsYAxis/{useAxisProps.js → useAxisTicksProps.js} +5 -44
  35. package/ChartsYAxis/utilities.d.ts +0 -1
  36. package/ChartsYAxis/utilities.js +1 -7
  37. package/LineChart/useAreaPlotData.js +2 -2
  38. package/LineChart/useLineChartProps.js +2 -1
  39. package/LineChart/useLinePlotData.js +2 -2
  40. package/PieChart/PieChart.js +1 -0
  41. package/RadarChart/RadarAxis/useRadarAxis.js +2 -2
  42. package/RadarChart/useRadarChartProps.js +2 -1
  43. package/ScatterChart/useScatterChartProps.js +2 -1
  44. package/Toolbar/Toolbar.js +2 -1
  45. package/esm/BarChart/index.d.ts +1 -0
  46. package/esm/BarChart/useBarChartProps.js +4 -3
  47. package/esm/ChartsAxisHighlight/ChartsXAxisHighlight.js +4 -4
  48. package/esm/ChartsAxisHighlight/ChartsYAxisHighlight.js +4 -4
  49. package/esm/ChartsLegend/ChartsLegend.js +2 -1
  50. package/esm/ChartsLegend/PiecewiseColorLegend.d.ts +2 -2
  51. package/esm/ChartsLegend/PiecewiseColorLegend.js +32 -22
  52. package/esm/ChartsLegend/piecewiseColorLegendClasses.d.ts +4 -0
  53. package/esm/ChartsLegend/piecewiseColorLegendClasses.js +2 -2
  54. package/esm/ChartsSurface/ChartsSurface.js +2 -1
  55. package/esm/ChartsWrapper/ChartsWrapper.d.ts +4 -0
  56. package/esm/ChartsWrapper/ChartsWrapper.js +73 -25
  57. package/esm/ChartsXAxis/ChartsGroupedXAxisTicks.d.ts +8 -0
  58. package/esm/ChartsXAxis/{ChartsGroupedXAxis.js → ChartsGroupedXAxisTicks.js} +12 -55
  59. package/esm/ChartsXAxis/ChartsSingleXAxisTicks.d.ts +10 -0
  60. package/esm/ChartsXAxis/{ChartsSingleXAxis.js → ChartsSingleXAxisTicks.js} +16 -54
  61. package/esm/ChartsXAxis/ChartsXAxis.js +4 -6
  62. package/esm/ChartsXAxis/ChartsXAxisImpl.d.ts +13 -0
  63. package/esm/ChartsXAxis/ChartsXAxisImpl.js +110 -0
  64. package/esm/ChartsXAxis/getVisibleLabels.js +5 -1
  65. package/esm/ChartsXAxis/{useAxisProps.d.ts → useAxisTicksProps.d.ts} +1 -496
  66. package/esm/ChartsXAxis/{useAxisProps.js → useAxisTicksProps.js} +3 -29
  67. package/esm/ChartsXAxis/utilities.d.ts +1 -2
  68. package/esm/ChartsXAxis/utilities.js +0 -6
  69. package/{ChartsYAxis/ChartsGroupedYAxis.d.ts → esm/ChartsYAxis/ChartsGroupedYAxisTicks.d.ts} +2 -2
  70. package/esm/ChartsYAxis/{ChartsGroupedYAxis.js → ChartsGroupedYAxisTicks.js} +12 -55
  71. package/esm/ChartsYAxis/ChartsSingleYAxisTicks.d.ts +10 -0
  72. package/esm/ChartsYAxis/{ChartsSingleYAxis.js → ChartsSingleYAxisTicks.js} +16 -53
  73. package/esm/ChartsYAxis/ChartsYAxis.js +5 -7
  74. package/esm/ChartsYAxis/ChartsYAxisImpl.d.ts +13 -0
  75. package/esm/ChartsYAxis/ChartsYAxisImpl.js +126 -0
  76. package/esm/ChartsYAxis/{useAxisProps.d.ts → useAxisTicksProps.d.ts} +1 -504
  77. package/esm/ChartsYAxis/{useAxisProps.js → useAxisTicksProps.js} +4 -42
  78. package/esm/ChartsYAxis/utilities.d.ts +0 -1
  79. package/esm/ChartsYAxis/utilities.js +0 -6
  80. package/esm/LineChart/useAreaPlotData.js +2 -2
  81. package/esm/LineChart/useLineChartProps.js +2 -1
  82. package/esm/LineChart/useLinePlotData.js +2 -2
  83. package/esm/PieChart/PieChart.js +1 -0
  84. package/esm/RadarChart/RadarAxis/useRadarAxis.js +2 -2
  85. package/esm/RadarChart/useRadarChartProps.js +2 -1
  86. package/esm/ScatterChart/useScatterChartProps.js +2 -1
  87. package/esm/Toolbar/Toolbar.js +2 -1
  88. package/esm/hooks/useInteractionItemProps.js +5 -4
  89. package/esm/hooks/useScale.js +2 -2
  90. package/esm/hooks/useTicks.js +10 -3
  91. package/esm/hooks/useTicksGrouped.js +2 -2
  92. package/esm/index.js +1 -1
  93. package/esm/internals/dateHelpers.d.ts +4 -2
  94. package/esm/internals/dateHelpers.js +5 -4
  95. package/esm/internals/defaultValueFormatters.js +5 -0
  96. package/esm/internals/index.d.ts +1 -1
  97. package/esm/internals/index.js +1 -1
  98. package/esm/internals/invertScale.js +2 -2
  99. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +5 -5
  100. package/esm/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -3
  101. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
  102. package/esm/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +2 -2
  103. package/esm/internals/scaleGuards.d.ts +4 -0
  104. package/esm/internals/scaleGuards.js +3 -0
  105. package/esm/locales/index.d.ts +2 -1
  106. package/esm/locales/index.js +1 -0
  107. package/esm/locales/svSE.d.ts +19 -0
  108. package/esm/locales/svSE.js +15 -0
  109. package/esm/models/axis.d.ts +3 -0
  110. package/hooks/useInteractionItemProps.js +6 -4
  111. package/hooks/useScale.js +2 -2
  112. package/hooks/useTicks.js +10 -3
  113. package/hooks/useTicksGrouped.js +2 -2
  114. package/index.js +1 -1
  115. package/internals/dateHelpers.d.ts +4 -2
  116. package/internals/dateHelpers.js +5 -4
  117. package/internals/defaultValueFormatters.js +5 -0
  118. package/internals/index.d.ts +1 -1
  119. package/internals/index.js +4 -4
  120. package/internals/invertScale.js +2 -2
  121. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.js +5 -5
  122. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisValue.js +3 -3
  123. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.js +2 -2
  124. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisIndex.js +2 -2
  125. package/internals/scaleGuards.d.ts +4 -0
  126. package/internals/{isBandScale.js → scaleGuards.js} +2 -2
  127. package/locales/index.d.ts +2 -1
  128. package/locales/index.js +11 -0
  129. package/locales/svSE.d.ts +19 -0
  130. package/locales/svSE.js +21 -0
  131. package/models/axis.d.ts +3 -0
  132. package/package.json +5 -5
  133. package/ChartsXAxis/ChartsGroupedXAxis.d.ts +0 -7
  134. package/ChartsXAxis/ChartsSingleXAxis.d.ts +0 -7
  135. package/ChartsYAxis/ChartsSingleYAxis.d.ts +0 -7
  136. package/esm/ChartsXAxis/ChartsGroupedXAxis.d.ts +0 -7
  137. package/esm/ChartsXAxis/ChartsSingleXAxis.d.ts +0 -7
  138. package/esm/ChartsYAxis/ChartsSingleYAxis.d.ts +0 -7
  139. package/esm/internals/isBandScale.d.ts +0 -5
  140. package/esm/internals/isBandScale.js +0 -3
  141. package/internals/isBandScale.d.ts +0 -5
@@ -15,14 +15,15 @@ const isDateData = data => data?.[0] instanceof Date;
15
15
 
16
16
  /**
17
17
  * Creates a formatter function for date values.
18
- * @param axis The axis configuration.
18
+ * @param data The data array containing Date or NumberValue objects.
19
19
  * @param range The range for the time scale.
20
+ * @param tickNumber (Optional) The number of ticks for formatting.
20
21
  * @returns A formatter function for date values.
21
22
  */
22
23
  exports.isDateData = isDateData;
23
- function createDateFormatter(axis, range) {
24
- const timeScale = (0, _d3Scale.scaleTime)(axis.data, range);
24
+ function createDateFormatter(data, range, tickNumber) {
25
+ const timeScale = (0, _d3Scale.scaleTime)(data, range);
25
26
  return (v, {
26
27
  location
27
- }) => location === 'tick' ? timeScale.tickFormat(axis.tickNumber)(v) : `${v.toLocaleString()}`;
28
+ }) => location === 'tick' ? timeScale.tickFormat(tickNumber)(v) : `${v.toLocaleString()}`;
28
29
  }
@@ -11,6 +11,11 @@ exports.createScalarFormatter = createScalarFormatter;
11
11
  function createScalarFormatter(tickNumber, zoomScale) {
12
12
  return function defaultScalarValueFormatter(value, context) {
13
13
  if (context.location === 'tick') {
14
+ const domain = context.scale.domain();
15
+ const zeroSizeDomain = domain[0] === domain[1];
16
+ if (zeroSizeDomain) {
17
+ return context.scale.tickFormat(1)(value);
18
+ }
14
19
  return context.scale.tickFormat(tickNumber)(value);
15
20
  }
16
21
  if (context.location === 'zoom-slider-tooltip') {
@@ -52,7 +52,7 @@ export * from "./colorScale.js";
52
52
  export * from "./ticks.js";
53
53
  export * from "./dateHelpers.js";
54
54
  export * from "./invertScale.js";
55
- export * from "./isBandScale.js";
55
+ export * from "./scaleGuards.js";
56
56
  export * from "./findMinMax.js";
57
57
  export { getAxisExtremum } from "./plugins/featurePlugins/useChartCartesianAxis/getAxisExtremum.js";
58
58
  export * from "../context/ChartProvider/index.js";
@@ -604,15 +604,15 @@ Object.keys(_invertScale).forEach(function (key) {
604
604
  }
605
605
  });
606
606
  });
607
- var _isBandScale = require("./isBandScale");
608
- Object.keys(_isBandScale).forEach(function (key) {
607
+ var _scaleGuards = require("./scaleGuards");
608
+ Object.keys(_scaleGuards).forEach(function (key) {
609
609
  if (key === "default" || key === "__esModule") return;
610
610
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
611
- if (key in exports && exports[key] === _isBandScale[key]) return;
611
+ if (key in exports && exports[key] === _scaleGuards[key]) return;
612
612
  Object.defineProperty(exports, key, {
613
613
  enumerable: true,
614
614
  get: function () {
615
- return _isBandScale[key];
615
+ return _scaleGuards[key];
616
616
  }
617
617
  });
618
618
  });
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.invertScale = invertScale;
7
- var _isBandScale = require("./isBandScale");
7
+ var _scaleGuards = require("./scaleGuards");
8
8
  function invertScale(scale, data, value) {
9
- if ((0, _isBandScale.isBandScale)(scale)) {
9
+ if ((0, _scaleGuards.isOrdinalScale)(scale)) {
10
10
  const dataIndex = scale.bandwidth() === 0 ? Math.floor((value - Math.min(...scale.range()) + scale.step() / 2) / scale.step()) : Math.floor((value - Math.min(...scale.range())) / scale.step());
11
11
  return data[dataIndex];
12
12
  }
@@ -19,9 +19,9 @@ var _getAxisTriggerTooltip = require("./getAxisTriggerTooltip");
19
19
  var _getAxisDomainLimit = require("./getAxisDomainLimit");
20
20
  function getRange(drawingArea, axisDirection,
21
21
  // | 'rotation' | 'radius',
22
- axis) {
22
+ reverse) {
23
23
  const range = axisDirection === 'x' ? [drawingArea.left, drawingArea.left + drawingArea.width] : [drawingArea.top + drawingArea.height, drawingArea.top];
24
- return axis.reverse ? [range[1], range[0]] : range;
24
+ return reverse ? [range[1], range[0]] : range;
25
25
  }
26
26
  const DEFAULT_CATEGORY_GAP_RATIO = 0.2;
27
27
  const DEFAULT_BAR_GAP_RATIO = 0.1;
@@ -49,7 +49,7 @@ function computeAxisValue({
49
49
  const zoomOption = zoomOptions?.[axis.id];
50
50
  const zoom = zoomMap?.get(axis.id);
51
51
  const zoomRange = zoom ? [zoom.start, zoom.end] : [0, 100];
52
- const range = getRange(drawingArea, axisDirection, axis);
52
+ const range = getRange(drawingArea, axisDirection, axis.reverse ?? false);
53
53
  const [minData, maxData] = (0, _getAxisExtremum.getAxisExtremum)(axis, axisDirection, seriesConfig, axisIndex, formattedSeries, zoom === undefined && !zoomOption ? getFilters : undefined // Do not apply filtering if zoom is already defined.
54
54
  );
55
55
  const triggerTooltip = !axis.ignoreTooltip && axisIdsTriggeringTooltip.has(axis.id);
@@ -75,7 +75,7 @@ function computeAxisValue({
75
75
  }, axis.colorMap)) : (0, _colorScale.getColorScale)(axis.colorMap))
76
76
  });
77
77
  if ((0, _dateHelpers.isDateData)(axis.data)) {
78
- const dateFormatter = (0, _dateHelpers.createDateFormatter)(axis, scaleRange);
78
+ const dateFormatter = (0, _dateHelpers.createDateFormatter)(axis.data, scaleRange, axis.tickNumber);
79
79
  completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;
80
80
  }
81
81
  }
@@ -95,7 +95,7 @@ function computeAxisValue({
95
95
  }, axis.colorMap)) : (0, _colorScale.getColorScale)(axis.colorMap))
96
96
  });
97
97
  if ((0, _dateHelpers.isDateData)(axis.data)) {
98
- const dateFormatter = (0, _dateHelpers.createDateFormatter)(axis, scaleRange);
98
+ const dateFormatter = (0, _dateHelpers.createDateFormatter)(axis.data, scaleRange, axis.tickNumber);
99
99
  completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;
100
100
  }
101
101
  }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getAxisIndex = getAxisIndex;
7
7
  exports.getAxisValue = getAxisValue;
8
- var _isBandScale = require("../../../isBandScale");
8
+ var _scaleGuards = require("../../../scaleGuards");
9
9
  function getAsANumber(value) {
10
10
  return value instanceof Date ? value.getTime() : value;
11
11
  }
@@ -20,7 +20,7 @@ function getAxisIndex(axisConfig, pointerValue) {
20
20
  data: axisData,
21
21
  reverse
22
22
  } = axisConfig;
23
- if (!(0, _isBandScale.isBandScale)(scale)) {
23
+ if (!(0, _scaleGuards.isOrdinalScale)(scale)) {
24
24
  const value = scale.invert(pointerValue);
25
25
  if (axisData === undefined) {
26
26
  return -1;
@@ -58,7 +58,7 @@ function getAxisValue(axisConfig, pointerValue, dataIndex) {
58
58
  scale,
59
59
  data: axisData
60
60
  } = axisConfig;
61
- if (!(0, _isBandScale.isBandScale)(scale)) {
61
+ if (!(0, _scaleGuards.isOrdinalScale)(scale)) {
62
62
  if (dataIndex === null) {
63
63
  return scale.invert(pointerValue);
64
64
  }
@@ -70,7 +70,7 @@ function computeAxisValue({
70
70
  }, axis.colorMap)) : (0, _colorScale.getColorScale)(axis.colorMap))
71
71
  });
72
72
  if ((0, _dateHelpers.isDateData)(axis.data)) {
73
- const dateFormatter = (0, _dateHelpers.createDateFormatter)(axis, range);
73
+ const dateFormatter = (0, _dateHelpers.createDateFormatter)(axis.data, range, axis.tickNumber);
74
74
  completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;
75
75
  }
76
76
  }
@@ -87,7 +87,7 @@ function computeAxisValue({
87
87
  }, axis.colorMap)) : (0, _colorScale.getColorScale)(axis.colorMap))
88
88
  });
89
89
  if ((0, _dateHelpers.isDateData)(axis.data)) {
90
- const dateFormatter = (0, _dateHelpers.createDateFormatter)(axis, range);
90
+ const dateFormatter = (0, _dateHelpers.createDateFormatter)(axis.data, range, axis.tickNumber);
91
91
  completeAxis[axis.id].valueFormatter = axis.valueFormatter ?? dateFormatter;
92
92
  }
93
93
  }
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getAxisIndex = getAxisIndex;
7
- var _isBandScale = require("../../../isBandScale");
7
+ var _scaleGuards = require("../../../scaleGuards");
8
8
  var _clampAngle = require("../../../clampAngle");
9
9
  /**
10
10
  * For a pointer coordinate, this function returns the value and dataIndex associated.
@@ -16,7 +16,7 @@ function getAxisIndex(axisConfig, pointerValue) {
16
16
  data: axisData,
17
17
  reverse
18
18
  } = axisConfig;
19
- if (!(0, _isBandScale.isBandScale)(scale)) {
19
+ if (!(0, _scaleGuards.isOrdinalScale)(scale)) {
20
20
  throw new Error('MUI X Charts: getAxisValue is not implemented for polare continuous axes.');
21
21
  }
22
22
  if (!axisData) {
@@ -0,0 +1,4 @@
1
+ import { D3OrdinalScale, D3Scale } from "../models/axis.js";
2
+ export declare function isOrdinalScale<T extends {
3
+ toString(): string;
4
+ }>(scale: D3Scale<T>): scale is D3OrdinalScale<T>;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.isBandScale = isBandScale;
7
- function isBandScale(scale) {
6
+ exports.isOrdinalScale = isOrdinalScale;
7
+ function isOrdinalScale(scale) {
8
8
  return scale.bandwidth !== undefined;
9
9
  }
@@ -3,4 +3,5 @@ export * from "./elGR.js";
3
3
  export * from "./enUS.js";
4
4
  export * from "./frFR.js";
5
5
  export * from "./ptBR.js";
6
- export * from "./ptPT.js";
6
+ export * from "./ptPT.js";
7
+ export * from "./svSE.js";
package/locales/index.js CHANGED
@@ -57,4 +57,15 @@ Object.keys(_ptPT).forEach(function (key) {
57
57
  return _ptPT[key];
58
58
  }
59
59
  });
60
+ });
61
+ var _svSE = require("./svSE");
62
+ Object.keys(_svSE).forEach(function (key) {
63
+ if (key === "default" || key === "__esModule") return;
64
+ if (key in exports && exports[key] === _svSE[key]) return;
65
+ Object.defineProperty(exports, key, {
66
+ enumerable: true,
67
+ get: function () {
68
+ return _svSE[key];
69
+ }
70
+ });
60
71
  });
@@ -0,0 +1,19 @@
1
+ import { ChartsLocaleText } from "./utils/chartsLocaleTextApi.js";
2
+ export declare const svSELocaleText: ChartsLocaleText;
3
+ export declare const svSE: {
4
+ components: {
5
+ MuiChartsLocalizationProvider: {
6
+ defaultProps: {
7
+ localeText: {
8
+ loading?: string | undefined;
9
+ noData?: string | undefined;
10
+ zoomIn?: string | undefined;
11
+ zoomOut?: string | undefined;
12
+ toolbarExport?: string | undefined;
13
+ toolbarExportPrint?: string | undefined;
14
+ toolbarExportImage?: ((mimeType: import("./utils/imageMimeTypes.js").ChartImageExportMimeType | (string & {})) => string) | undefined;
15
+ };
16
+ };
17
+ };
18
+ };
19
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.svSELocaleText = exports.svSE = void 0;
7
+ var _imageMimeTypes = require("./utils/imageMimeTypes");
8
+ var _getChartsLocalization = require("./utils/getChartsLocalization");
9
+ const svSELocaleText = exports.svSELocaleText = {
10
+ // Overlay
11
+ loading: 'Laddar data…',
12
+ noData: 'Inga data att visa',
13
+ // Toolbar
14
+ zoomIn: 'Zooma in',
15
+ zoomOut: 'Zooma ut',
16
+ toolbarExport: 'Exportera',
17
+ // Toolbar Export Menu
18
+ toolbarExportPrint: 'Skriv ut',
19
+ toolbarExportImage: mimeType => `Exportera som ${_imageMimeTypes.imageMimeTypes[mimeType] ?? mimeType}`
20
+ };
21
+ const svSE = exports.svSE = (0, _getChartsLocalization.getChartsLocalization)(svSELocaleText);
package/models/axis.d.ts CHANGED
@@ -11,6 +11,9 @@ export type D3Scale<Domain extends {
11
11
  toString(): string;
12
12
  } = number | Date | string, Range = number, Output = number> = ScaleBand<Domain> | ScaleSymLog<Range, Output> | ScaleLogarithmic<Range, Output> | ScalePoint<Domain> | ScalePower<Range, Output> | ScaleTime<Range, Output> | ScaleLinear<Range, Output>;
13
13
  export type D3ContinuousScale<Range = number, Output = number> = ScaleSymLog<Range, Output> | ScaleLogarithmic<Range, Output> | ScalePower<Range, Output> | ScaleTime<Range, Output> | ScaleLinear<Range, Output>;
14
+ export type D3OrdinalScale<Domain extends {
15
+ toString(): string;
16
+ } = number | Date | string> = ScaleBand<Domain> | ScalePoint<Domain>;
14
17
  export interface ChartsAxisSlots {
15
18
  /**
16
19
  * Custom component for the axis main line.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts",
3
- "version": "8.11.1",
3
+ "version": "8.11.3",
4
4
  "author": "MUI Team",
5
5
  "description": "The community edition of MUI X Charts components.",
6
6
  "license": "MIT",
@@ -28,15 +28,15 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.28.2",
31
- "@mui/utils": "^7.3.1",
31
+ "@mui/utils": "^7.3.2",
32
32
  "bezier-easing": "^2.1.0",
33
33
  "clsx": "^2.1.1",
34
34
  "prop-types": "^15.8.1",
35
35
  "reselect": "^5.1.1",
36
36
  "use-sync-external-store": "^1.5.0",
37
- "@mui/x-internal-gestures": "0.2.5",
38
- "@mui/x-charts-vendor": "8.11.0",
39
- "@mui/x-internals": "8.11.1"
37
+ "@mui/x-charts-vendor": "8.11.3",
38
+ "@mui/x-internals": "8.11.3",
39
+ "@mui/x-internal-gestures": "0.2.6"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@emotion/react": "^11.9.0",
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { ChartsXAxisProps } from "../models/axis.js";
3
- /**
4
- * @ignore - internal component.
5
- */
6
- declare function ChartsGroupedXAxis(inProps: ChartsXAxisProps): React.JSX.Element | null;
7
- export { ChartsGroupedXAxis };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { ChartsXAxisProps } from "../models/axis.js";
3
- /**
4
- * @ignore - internal component.
5
- */
6
- declare function ChartsSingleXAxis(inProps: ChartsXAxisProps): React.JSX.Element | null;
7
- export { ChartsSingleXAxis };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { ChartsYAxisProps } from "../models/axis.js";
3
- /**
4
- * @ignore - internal component.
5
- */
6
- declare function ChartsSingleYAxis(inProps: ChartsYAxisProps): React.JSX.Element | null;
7
- export { ChartsSingleYAxis };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { ChartsXAxisProps } from "../models/axis.js";
3
- /**
4
- * @ignore - internal component.
5
- */
6
- declare function ChartsGroupedXAxis(inProps: ChartsXAxisProps): React.JSX.Element | null;
7
- export { ChartsGroupedXAxis };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { ChartsXAxisProps } from "../models/axis.js";
3
- /**
4
- * @ignore - internal component.
5
- */
6
- declare function ChartsSingleXAxis(inProps: ChartsXAxisProps): React.JSX.Element | null;
7
- export { ChartsSingleXAxis };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- import { ChartsYAxisProps } from "../models/axis.js";
3
- /**
4
- * @ignore - internal component.
5
- */
6
- declare function ChartsSingleYAxis(inProps: ChartsYAxisProps): React.JSX.Element | null;
7
- export { ChartsSingleYAxis };
@@ -1,5 +0,0 @@
1
- import type { ScaleBand, ScalePoint } from '@mui/x-charts-vendor/d3-scale';
2
- import { D3Scale } from "../models/axis.js";
3
- export declare function isBandScale<T extends {
4
- toString(): string;
5
- }>(scale: D3Scale<T>): scale is ScaleBand<T> | ScalePoint<T>;
@@ -1,3 +0,0 @@
1
- export function isBandScale(scale) {
2
- return scale.bandwidth !== undefined;
3
- }
@@ -1,5 +0,0 @@
1
- import type { ScaleBand, ScalePoint } from '@mui/x-charts-vendor/d3-scale';
2
- import { D3Scale } from "../models/axis.js";
3
- export declare function isBandScale<T extends {
4
- toString(): string;
5
- }>(scale: D3Scale<T>): scale is ScaleBand<T> | ScalePoint<T>;