@mui/x-charts 7.7.1 → 7.9.0
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.
- package/BarChart/BarChart.d.ts +3 -3
- package/BarChart/BarElement.d.ts +225 -228
- package/BarChart/BarLabel/BarLabel.d.ts +225 -228
- package/BarChart/BarLabel/getBarLabel.d.ts +1 -1
- package/BarChart/useBarChartProps.d.ts +20 -88
- package/CHANGELOG.md +166 -1
- package/ChartContainer/ChartContainer.d.ts +1 -1
- package/ChartContainer/ChartContainer.js +3 -1
- package/ChartContainer/useChartContainerHooks.d.ts +1 -1
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +19 -4
- package/ChartsReferenceLine/common.d.ts +0 -1
- package/ChartsSurface.js +5 -1
- package/ChartsTooltip/ChartsAxisTooltipContent.d.ts +3 -3
- package/ChartsTooltip/ChartsAxisTooltipContent.js +4 -39
- package/ChartsTooltip/ChartsItemTooltipContent.d.ts +7 -6
- package/ChartsTooltip/ChartsItemTooltipContent.js +4 -27
- package/ChartsTooltip/ChartsTooltip.d.ts +10 -9
- package/ChartsTooltip/ChartsTooltip.js +8 -2
- package/ChartsTooltip/ChartsTooltipTable.d.ts +15 -1
- package/ChartsTooltip/ChartsTooltipTable.js +19 -0
- package/ChartsTooltip/index.d.ts +1 -0
- package/ChartsTooltip/index.js +11 -0
- package/ChartsTooltip/utils.d.ts +7 -6
- package/ChartsTooltip/utils.js +24 -30
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +6 -6
- package/ChartsXAxis/ChartsXAxis.js +7 -5
- package/ChartsYAxis/ChartsYAxis.js +3 -1
- package/Gauge/GaugeProvider.d.ts +1 -1
- package/LineChart/AnimatedArea.d.ts +225 -228
- package/LineChart/AnimatedLine.d.ts +225 -228
- package/LineChart/LineChart.d.ts +3 -3
- package/LineChart/MarkPlot.js +6 -2
- package/LineChart/useLineChartProps.d.ts +26 -103
- package/LineChart/useLineChartProps.js +3 -3
- package/PieChart/PieArc.d.ts +0 -1
- package/PieChart/PieArcLabel.d.ts +0 -1
- package/PieChart/PieChart.d.ts +3 -3
- package/PieChart/dataTransform/transition.d.ts +0 -1
- package/ResponsiveChartContainer/ResizableContainer.d.ts +1 -2
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -1
- package/ScatterChart/Scatter.js +7 -5
- package/ScatterChart/ScatterChart.d.ts +3 -3
- package/ScatterChart/ScatterChart.js +3 -1
- package/ScatterChart/useScatterChartProps.d.ts +20 -75
- package/SparkLineChart/SparkLineChart.d.ts +3 -3
- package/context/CartesianProvider/computeValue.d.ts +2 -2
- package/context/CartesianProvider/computeValue.js +36 -5
- package/context/CartesianProvider/normalizeAxis.d.ts +1 -1
- package/context/ZAxisContextProvider.js +7 -2
- package/esm/BarChart/useBarChartProps.js +0 -1
- package/esm/ChartContainer/ChartContainer.js +3 -1
- package/esm/ChartsAxisHighlight/ChartsAxisHighlight.js +19 -4
- package/esm/ChartsSurface.js +5 -1
- package/esm/ChartsTooltip/ChartsAxisTooltipContent.js +3 -38
- package/esm/ChartsTooltip/ChartsItemTooltipContent.js +3 -26
- package/esm/ChartsTooltip/ChartsTooltip.js +8 -2
- package/esm/ChartsTooltip/ChartsTooltipTable.js +20 -0
- package/esm/ChartsTooltip/index.js +2 -1
- package/esm/ChartsTooltip/utils.js +23 -30
- package/esm/ChartsVoronoiHandler/ChartsVoronoiHandler.js +6 -6
- package/esm/ChartsXAxis/ChartsXAxis.js +7 -5
- package/esm/ChartsYAxis/ChartsYAxis.js +3 -1
- package/esm/LineChart/MarkPlot.js +6 -2
- package/esm/LineChart/useLineChartProps.js +3 -3
- package/esm/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -1
- package/esm/ScatterChart/Scatter.js +7 -5
- package/esm/ScatterChart/ScatterChart.js +3 -1
- package/esm/context/CartesianProvider/computeValue.js +37 -6
- package/esm/context/ZAxisContextProvider.js +7 -2
- package/esm/hooks/index.js +1 -0
- package/esm/hooks/useAxis.js +17 -0
- package/esm/hooks/useAxisEvents.js +25 -17
- package/esm/hooks/useInteractionItemProps.js +11 -4
- package/esm/hooks/useScale.js +7 -14
- package/esm/hooks/useTicks.js +2 -1
- package/esm/internals/getSVGPoint.js +11 -0
- package/esm/internals/index.js +4 -0
- package/esm/internals/utils.js +0 -12
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +12 -0
- package/hooks/useAxis.d.ts +2 -0
- package/hooks/useAxis.js +24 -0
- package/hooks/useAxisEvents.js +25 -17
- package/hooks/useChartDimensions.d.ts +1 -1
- package/hooks/useColor.d.ts +1 -1
- package/hooks/useInteractionItemProps.d.ts +4 -2
- package/hooks/useInteractionItemProps.js +11 -4
- package/hooks/useScale.js +6 -14
- package/hooks/useTicks.js +2 -1
- package/index.js +1 -1
- package/internals/components/AxisSharedComponents.d.ts +0 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +1 -1
- package/internals/defaultizeColor.d.ts +68 -68
- package/internals/getSVGPoint.d.ts +6 -0
- package/internals/getSVGPoint.js +17 -0
- package/internals/getWordsByLines.d.ts +0 -1
- package/internals/index.d.ts +4 -0
- package/internals/index.js +40 -0
- package/internals/useAnimatedPath.d.ts +0 -1
- package/internals/utils.d.ts +0 -6
- package/internals/utils.js +0 -13
- package/models/axis.d.ts +1 -2
- package/models/colorMapping.d.ts +1 -1
- package/models/z-axis.d.ts +8 -0
- package/modern/BarChart/useBarChartProps.js +0 -1
- package/modern/ChartContainer/ChartContainer.js +3 -1
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +19 -4
- package/modern/ChartsSurface.js +5 -1
- package/modern/ChartsTooltip/ChartsAxisTooltipContent.js +3 -38
- package/modern/ChartsTooltip/ChartsItemTooltipContent.js +3 -26
- package/modern/ChartsTooltip/ChartsTooltip.js +8 -2
- package/modern/ChartsTooltip/ChartsTooltipTable.js +20 -0
- package/modern/ChartsTooltip/index.js +2 -1
- package/modern/ChartsTooltip/utils.js +23 -30
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +6 -6
- package/modern/ChartsXAxis/ChartsXAxis.js +7 -5
- package/modern/ChartsYAxis/ChartsYAxis.js +3 -1
- package/modern/LineChart/MarkPlot.js +6 -2
- package/modern/LineChart/useLineChartProps.js +3 -3
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +3 -1
- package/modern/ScatterChart/Scatter.js +7 -5
- package/modern/ScatterChart/ScatterChart.js +3 -1
- package/modern/context/CartesianProvider/computeValue.js +37 -6
- package/modern/context/ZAxisContextProvider.js +7 -2
- package/modern/hooks/index.js +1 -0
- package/modern/hooks/useAxis.js +17 -0
- package/modern/hooks/useAxisEvents.js +25 -17
- package/modern/hooks/useInteractionItemProps.js +11 -4
- package/modern/hooks/useScale.js +7 -14
- package/modern/hooks/useTicks.js +2 -1
- package/modern/index.js +1 -1
- package/modern/internals/getSVGPoint.js +11 -0
- package/modern/internals/index.js +4 -0
- package/modern/internals/utils.js +0 -12
- package/package.json +3 -3
- package/themeAugmentation/props.d.ts +2 -1
|
@@ -3,18 +3,6 @@ export function getSymbol(shape) {
|
|
|
3
3
|
const symbolNames = 'circle cross diamond square star triangle wye'.split(/ /);
|
|
4
4
|
return symbolNames.indexOf(shape) || 0;
|
|
5
5
|
}
|
|
6
|
-
/**
|
|
7
|
-
* Transform mouse event position to coordinates inside the SVG.
|
|
8
|
-
* @param svg The SVG element
|
|
9
|
-
* @param event The mouseEvent to transform
|
|
10
|
-
*/
|
|
11
|
-
export function getSVGPoint(svg, event) {
|
|
12
|
-
const pt = svg.createSVGPoint();
|
|
13
|
-
pt.x = event.clientX;
|
|
14
|
-
pt.y = event.clientY;
|
|
15
|
-
return pt.matrixTransform(svg.getScreenCTM().inverse());
|
|
16
|
-
}
|
|
17
|
-
|
|
18
6
|
/**
|
|
19
7
|
* Helper that converts values and percentages into values.
|
|
20
8
|
* @param value The value provided by the developer. Can either be a number or a string with '%' or 'px'.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-charts",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.0",
|
|
4
4
|
"description": "The community edition of the Charts components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.24.7",
|
|
33
33
|
"@mui/base": "^5.0.0-beta.40",
|
|
34
|
-
"@mui/system": "^5.
|
|
35
|
-
"@mui/utils": "^5.
|
|
34
|
+
"@mui/system": "^5.16.0",
|
|
35
|
+
"@mui/utils": "^5.16.0",
|
|
36
36
|
"@react-spring/rafz": "^9.7.3",
|
|
37
37
|
"@react-spring/web": "^9.7.3",
|
|
38
38
|
"clsx": "^2.1.1",
|
|
@@ -13,6 +13,7 @@ import { LineChartProps } from '../LineChart/LineChart';
|
|
|
13
13
|
import { ScatterProps } from '../ScatterChart/Scatter';
|
|
14
14
|
import { ScatterChartProps } from '../ScatterChart/ScatterChart';
|
|
15
15
|
import { ChartsXAxisProps, ChartsYAxisProps } from '../models/axis';
|
|
16
|
+
import { ChartSeriesType } from '../models/seriesType/config';
|
|
16
17
|
|
|
17
18
|
export interface ChartsComponentsPropsList {
|
|
18
19
|
MuiChartsAxis: ChartsAxisProps;
|
|
@@ -22,7 +23,7 @@ export interface ChartsComponentsPropsList {
|
|
|
22
23
|
MuiChartsClipPath: ChartsClipPathProps;
|
|
23
24
|
MuiChartsGrid: ChartsGridProps;
|
|
24
25
|
MuiChartsLegend: ChartsLegendProps;
|
|
25
|
-
MuiChartsTooltip: ChartsTooltipProps
|
|
26
|
+
MuiChartsTooltip: ChartsTooltipProps<ChartSeriesType>;
|
|
26
27
|
MuiChartsSurface: ChartsSurfaceProps;
|
|
27
28
|
|
|
28
29
|
// BarChart components
|