@mui/x-charts 7.16.0 → 7.17.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.js +3 -0
- package/BarChart/BarElement.js +2 -0
- package/BarChart/BarLabel/BarLabel.js +2 -0
- package/BarChart/BarPlot.js +2 -0
- package/BarChart/legend.js +3 -2
- package/BarChart/useBarChartProps.js +2 -0
- package/CHANGELOG.md +87 -0
- package/ChartContainer/ChartContainer.js +2 -0
- package/ChartContainer/useChartContainerProps.js +2 -0
- package/ChartContainer/useDefaultizeAxis.js +2 -0
- package/ChartsAxis/ChartsAxis.js +2 -0
- package/ChartsAxisHighlight/ChartsAxisHighlight.js +2 -0
- package/ChartsClipPath/ChartsClipPath.js +2 -0
- package/ChartsGrid/ChartsGrid.js +2 -0
- package/ChartsLegend/ChartsLegend.js +11 -1
- package/ChartsLegend/ChartsLegendItem.d.ts +26 -0
- package/ChartsLegend/ChartsLegendItem.js +65 -0
- package/ChartsLegend/ContinuousColorLegend.js +2 -0
- package/ChartsLegend/DefaultChartsLegend.d.ts +9 -1
- package/ChartsLegend/DefaultChartsLegend.js +26 -4
- package/ChartsLegend/LegendPerItem.d.ts +1 -0
- package/ChartsLegend/LegendPerItem.js +19 -28
- package/ChartsLegend/PiecewiseColorLegend.d.ts +9 -1
- package/ChartsLegend/PiecewiseColorLegend.js +28 -7
- package/ChartsLegend/chartsLegend.types.d.ts +39 -1
- package/ChartsLegend/chartsLegendClasses.d.ts +2 -0
- package/ChartsLegend/chartsLegendClasses.js +1 -1
- package/ChartsLegend/useAxis.js +2 -0
- package/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +3 -1
- package/ChartsOverlay/ChartsLoadingOverlay.js +2 -0
- package/ChartsOverlay/ChartsNoDataOverlay.js +2 -0
- package/ChartsOverlay/ChartsOverlay.js +2 -0
- package/ChartsReferenceLine/ChartsReferenceLine.js +2 -0
- package/ChartsReferenceLine/ChartsXReferenceLine.js +3 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.js +3 -1
- package/ChartsSurface/ChartsSurface.js +2 -0
- package/ChartsText/ChartsText.js +2 -0
- package/ChartsTooltip/ChartsTooltip.js +2 -0
- package/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -0
- package/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -0
- package/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -0
- package/ChartsXAxis/ChartsXAxis.js +2 -0
- package/ChartsYAxis/ChartsYAxis.js +2 -0
- package/Gauge/Gauge.js +2 -0
- package/Gauge/GaugeContainer.js +2 -0
- package/Gauge/GaugeReferenceArc.js +2 -0
- package/Gauge/GaugeValueArc.js +2 -0
- package/Gauge/GaugeValueText.js +2 -0
- package/LineChart/AnimatedArea.js +2 -0
- package/LineChart/AnimatedLine.js +2 -0
- package/LineChart/AreaElement.js +2 -0
- package/LineChart/AreaPlot.js +2 -0
- package/LineChart/CircleMarkElement.d.ts +34 -0
- package/LineChart/CircleMarkElement.js +107 -0
- package/LineChart/LineChart.d.ts +4 -0
- package/LineChart/LineChart.js +7 -0
- package/LineChart/LineElement.js +2 -0
- package/LineChart/LineHighlightElement.js +2 -0
- package/LineChart/LineHighlightPlot.js +2 -0
- package/LineChart/LinePlot.js +2 -0
- package/LineChart/MarkElement.d.ts +1 -19
- package/LineChart/MarkElement.js +3 -19
- package/LineChart/MarkPlot.d.ts +6 -0
- package/LineChart/MarkPlot.js +13 -3
- package/LineChart/index.d.ts +2 -0
- package/LineChart/index.js +2 -1
- package/LineChart/legend.js +3 -2
- package/LineChart/markElementClasses.d.ts +20 -0
- package/LineChart/markElementClasses.js +19 -0
- package/LineChart/useLineChartProps.js +7 -3
- package/PieChart/PieArc.js +2 -0
- package/PieChart/PieArcLabel.js +2 -0
- package/PieChart/PieArcLabelPlot.js +2 -0
- package/PieChart/PieArcPlot.js +2 -0
- package/PieChart/PieChart.js +3 -0
- package/PieChart/PiePlot.js +2 -0
- package/PieChart/dataTransform/useTransformData.js +2 -0
- package/PieChart/legend.js +3 -1
- package/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/ResponsiveChartContainer/useChartContainerDimensions.js +3 -1
- package/ResponsiveChartContainer/useResponsiveChartContainerProps.js +2 -0
- package/ScatterChart/Scatter.js +2 -0
- package/ScatterChart/ScatterChart.js +3 -0
- package/ScatterChart/ScatterPlot.js +2 -0
- package/ScatterChart/legend.js +3 -2
- package/ScatterChart/useScatterChartProps.js +2 -0
- package/SparkLineChart/SparkLineChart.js +2 -0
- package/context/CartesianProvider/CartesianProvider.js +2 -0
- package/context/CartesianProvider/useCartesianContext.js +2 -0
- package/context/DrawingProvider.js +2 -0
- package/context/HighlightedProvider/HighlightedProvider.js +2 -0
- package/context/HighlightedProvider/useHighlighted.js +2 -0
- package/context/HighlightedProvider/useItemHighlighted.js +2 -0
- package/context/InteractionProvider.js +2 -0
- package/context/PluginProvider/PluginProvider.js +2 -0
- package/context/PluginProvider/useColorProcessor.js +2 -0
- package/context/PluginProvider/useSeriesFormatter.js +2 -0
- package/context/SeriesProvider/SeriesProvider.js +2 -0
- package/context/ZAxisContextProvider.js +2 -0
- package/hooks/useAxis.js +2 -0
- package/hooks/useAxisEvents.js +2 -0
- package/hooks/useChartDimensions.js +2 -0
- package/hooks/useChartId.js +2 -0
- package/hooks/useColorScale.js +2 -0
- package/hooks/useDrawingArea.js +2 -0
- package/hooks/useInteractionItemProps.js +2 -0
- package/hooks/useMounted.js +2 -0
- package/hooks/useReducedMotion.js +2 -0
- package/hooks/useScale.js +2 -0
- package/hooks/useSeries.js +2 -0
- package/hooks/useSvgRef.js +2 -0
- package/hooks/useTicks.js +2 -0
- package/index.js +1 -1
- package/modern/BarChart/BarChart.js +3 -0
- package/modern/BarChart/BarElement.js +2 -0
- package/modern/BarChart/BarLabel/BarLabel.js +2 -0
- package/modern/BarChart/BarPlot.js +2 -0
- package/modern/BarChart/legend.js +3 -2
- package/modern/BarChart/useBarChartProps.js +2 -0
- package/modern/ChartContainer/ChartContainer.js +2 -0
- package/modern/ChartContainer/useChartContainerProps.js +2 -0
- package/modern/ChartContainer/useDefaultizeAxis.js +2 -0
- package/modern/ChartsAxis/ChartsAxis.js +2 -0
- package/modern/ChartsAxisHighlight/ChartsAxisHighlight.js +2 -0
- package/modern/ChartsClipPath/ChartsClipPath.js +2 -0
- package/modern/ChartsGrid/ChartsGrid.js +2 -0
- package/modern/ChartsLegend/ChartsLegend.js +11 -1
- package/modern/ChartsLegend/ChartsLegendItem.js +65 -0
- package/modern/ChartsLegend/ContinuousColorLegend.js +2 -0
- package/modern/ChartsLegend/DefaultChartsLegend.js +26 -4
- package/modern/ChartsLegend/LegendPerItem.js +19 -28
- package/modern/ChartsLegend/PiecewiseColorLegend.js +28 -7
- package/modern/ChartsLegend/chartsLegendClasses.js +1 -1
- package/modern/ChartsLegend/useAxis.js +2 -0
- package/modern/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +3 -1
- package/modern/ChartsOverlay/ChartsLoadingOverlay.js +2 -0
- package/modern/ChartsOverlay/ChartsNoDataOverlay.js +2 -0
- package/modern/ChartsOverlay/ChartsOverlay.js +2 -0
- package/modern/ChartsReferenceLine/ChartsReferenceLine.js +2 -0
- package/modern/ChartsReferenceLine/ChartsXReferenceLine.js +3 -1
- package/modern/ChartsReferenceLine/ChartsYReferenceLine.js +3 -1
- package/modern/ChartsSurface/ChartsSurface.js +2 -0
- package/modern/ChartsText/ChartsText.js +2 -0
- package/modern/ChartsTooltip/ChartsTooltip.js +2 -0
- package/modern/ChartsTooltip/DefaultChartsAxisTooltipContent.js +2 -0
- package/modern/ChartsTooltip/DefaultChartsItemTooltipContent.js +2 -0
- package/modern/ChartsVoronoiHandler/ChartsVoronoiHandler.js +2 -0
- package/modern/ChartsXAxis/ChartsXAxis.js +2 -0
- package/modern/ChartsYAxis/ChartsYAxis.js +2 -0
- package/modern/Gauge/Gauge.js +2 -0
- package/modern/Gauge/GaugeContainer.js +2 -0
- package/modern/Gauge/GaugeReferenceArc.js +2 -0
- package/modern/Gauge/GaugeValueArc.js +2 -0
- package/modern/Gauge/GaugeValueText.js +2 -0
- package/modern/LineChart/AnimatedArea.js +2 -0
- package/modern/LineChart/AnimatedLine.js +2 -0
- package/modern/LineChart/AreaElement.js +2 -0
- package/modern/LineChart/AreaPlot.js +2 -0
- package/modern/LineChart/CircleMarkElement.js +107 -0
- package/modern/LineChart/LineChart.js +7 -0
- package/modern/LineChart/LineElement.js +2 -0
- package/modern/LineChart/LineHighlightElement.js +2 -0
- package/modern/LineChart/LineHighlightPlot.js +2 -0
- package/modern/LineChart/LinePlot.js +2 -0
- package/modern/LineChart/MarkElement.js +3 -19
- package/modern/LineChart/MarkPlot.js +13 -3
- package/modern/LineChart/index.js +2 -1
- package/modern/LineChart/legend.js +3 -2
- package/modern/LineChart/markElementClasses.js +19 -0
- package/modern/LineChart/useLineChartProps.js +7 -3
- package/modern/PieChart/PieArc.js +2 -0
- package/modern/PieChart/PieArcLabel.js +2 -0
- package/modern/PieChart/PieArcLabelPlot.js +2 -0
- package/modern/PieChart/PieArcPlot.js +2 -0
- package/modern/PieChart/PieChart.js +3 -0
- package/modern/PieChart/PiePlot.js +2 -0
- package/modern/PieChart/dataTransform/useTransformData.js +2 -0
- package/modern/PieChart/legend.js +3 -1
- package/modern/ResponsiveChartContainer/ResponsiveChartContainer.js +2 -0
- package/modern/ResponsiveChartContainer/useChartContainerDimensions.js +3 -1
- package/modern/ResponsiveChartContainer/useResponsiveChartContainerProps.js +2 -0
- package/modern/ScatterChart/Scatter.js +2 -0
- package/modern/ScatterChart/ScatterChart.js +3 -0
- package/modern/ScatterChart/ScatterPlot.js +2 -0
- package/modern/ScatterChart/legend.js +3 -2
- package/modern/ScatterChart/useScatterChartProps.js +2 -0
- package/modern/SparkLineChart/SparkLineChart.js +2 -0
- package/modern/context/CartesianProvider/CartesianProvider.js +2 -0
- package/modern/context/CartesianProvider/useCartesianContext.js +2 -0
- package/modern/context/DrawingProvider.js +2 -0
- package/modern/context/HighlightedProvider/HighlightedProvider.js +2 -0
- package/modern/context/HighlightedProvider/useHighlighted.js +2 -0
- package/modern/context/HighlightedProvider/useItemHighlighted.js +2 -0
- package/modern/context/InteractionProvider.js +2 -0
- package/modern/context/PluginProvider/PluginProvider.js +2 -0
- package/modern/context/PluginProvider/useColorProcessor.js +2 -0
- package/modern/context/PluginProvider/useSeriesFormatter.js +2 -0
- package/modern/context/SeriesProvider/SeriesProvider.js +2 -0
- package/modern/context/ZAxisContextProvider.js +2 -0
- package/modern/hooks/useAxis.js +2 -0
- package/modern/hooks/useAxisEvents.js +2 -0
- package/modern/hooks/useChartDimensions.js +2 -0
- package/modern/hooks/useChartId.js +2 -0
- package/modern/hooks/useColorScale.js +2 -0
- package/modern/hooks/useDrawingArea.js +2 -0
- package/modern/hooks/useInteractionItemProps.js +2 -0
- package/modern/hooks/useMounted.js +2 -0
- package/modern/hooks/useReducedMotion.js +2 -0
- package/modern/hooks/useScale.js +2 -0
- package/modern/hooks/useSeries.js +2 -0
- package/modern/hooks/useSvgRef.js +2 -0
- package/modern/hooks/useTicks.js +2 -0
- package/modern/index.js +1 -1
- package/node/BarChart/BarChart.js +2 -0
- package/node/BarChart/BarElement.js +1 -0
- package/node/BarChart/BarLabel/BarLabel.js +1 -0
- package/node/BarChart/BarPlot.js +1 -0
- package/node/BarChart/legend.js +3 -2
- package/node/BarChart/useBarChartProps.js +1 -0
- package/node/ChartContainer/ChartContainer.js +1 -0
- package/node/ChartContainer/useChartContainerProps.js +1 -0
- package/node/ChartContainer/useDefaultizeAxis.js +1 -0
- package/node/ChartsAxis/ChartsAxis.js +1 -0
- package/node/ChartsAxisHighlight/ChartsAxisHighlight.js +1 -0
- package/node/ChartsClipPath/ChartsClipPath.js +1 -0
- package/node/ChartsGrid/ChartsGrid.js +1 -0
- package/node/ChartsLegend/ChartsLegend.js +10 -1
- package/node/ChartsLegend/ChartsLegendItem.js +72 -0
- package/node/ChartsLegend/ContinuousColorLegend.js +1 -0
- package/node/ChartsLegend/DefaultChartsLegend.js +25 -4
- package/node/ChartsLegend/LegendPerItem.js +18 -28
- package/node/ChartsLegend/PiecewiseColorLegend.js +27 -7
- package/node/ChartsLegend/chartsLegendClasses.js +1 -1
- package/node/ChartsLegend/useAxis.js +1 -0
- package/node/ChartsOnAxisClickHandler/ChartsOnAxisClickHandler.js +2 -1
- package/node/ChartsOverlay/ChartsLoadingOverlay.js +1 -0
- package/node/ChartsOverlay/ChartsNoDataOverlay.js +1 -0
- package/node/ChartsOverlay/ChartsOverlay.js +1 -0
- package/node/ChartsReferenceLine/ChartsReferenceLine.js +1 -0
- package/node/ChartsReferenceLine/ChartsXReferenceLine.js +2 -1
- package/node/ChartsReferenceLine/ChartsYReferenceLine.js +2 -1
- package/node/ChartsSurface/ChartsSurface.js +1 -0
- package/node/ChartsText/ChartsText.js +1 -0
- package/node/ChartsTooltip/ChartsTooltip.js +1 -0
- package/node/ChartsTooltip/DefaultChartsAxisTooltipContent.js +1 -0
- package/node/ChartsTooltip/DefaultChartsItemTooltipContent.js +1 -0
- package/node/ChartsVoronoiHandler/ChartsVoronoiHandler.js +1 -0
- package/node/ChartsXAxis/ChartsXAxis.js +1 -0
- package/node/ChartsYAxis/ChartsYAxis.js +1 -0
- package/node/Gauge/Gauge.js +1 -0
- package/node/Gauge/GaugeContainer.js +1 -0
- package/node/Gauge/GaugeReferenceArc.js +1 -0
- package/node/Gauge/GaugeValueArc.js +1 -0
- package/node/Gauge/GaugeValueText.js +1 -0
- package/node/LineChart/AnimatedArea.js +1 -0
- package/node/LineChart/AnimatedLine.js +1 -0
- package/node/LineChart/AreaElement.js +1 -0
- package/node/LineChart/AreaPlot.js +1 -0
- package/node/LineChart/CircleMarkElement.js +113 -0
- package/node/LineChart/LineChart.js +6 -0
- package/node/LineChart/LineElement.js +1 -0
- package/node/LineChart/LineHighlightElement.js +1 -0
- package/node/LineChart/LineHighlightPlot.js +1 -0
- package/node/LineChart/LinePlot.js +1 -0
- package/node/LineChart/MarkElement.js +3 -22
- package/node/LineChart/MarkPlot.js +12 -3
- package/node/LineChart/index.js +29 -1
- package/node/LineChart/legend.js +3 -2
- package/node/LineChart/markElementClasses.js +28 -0
- package/node/LineChart/useLineChartProps.js +6 -3
- package/node/PieChart/PieArc.js +1 -0
- package/node/PieChart/PieArcLabel.js +1 -0
- package/node/PieChart/PieArcLabelPlot.js +1 -0
- package/node/PieChart/PieArcPlot.js +1 -0
- package/node/PieChart/PieChart.js +2 -0
- package/node/PieChart/PiePlot.js +1 -0
- package/node/PieChart/dataTransform/useTransformData.js +1 -0
- package/node/PieChart/legend.js +3 -1
- package/node/ResponsiveChartContainer/ResponsiveChartContainer.js +1 -0
- package/node/ResponsiveChartContainer/useChartContainerDimensions.js +2 -1
- package/node/ResponsiveChartContainer/useResponsiveChartContainerProps.js +1 -0
- package/node/ScatterChart/Scatter.js +1 -0
- package/node/ScatterChart/ScatterChart.js +2 -0
- package/node/ScatterChart/ScatterPlot.js +1 -0
- package/node/ScatterChart/legend.js +3 -2
- package/node/ScatterChart/useScatterChartProps.js +1 -0
- package/node/SparkLineChart/SparkLineChart.js +1 -0
- package/node/context/CartesianProvider/CartesianProvider.js +1 -0
- package/node/context/CartesianProvider/useCartesianContext.js +1 -0
- package/node/context/DrawingProvider.js +1 -0
- package/node/context/HighlightedProvider/HighlightedProvider.js +1 -0
- package/node/context/HighlightedProvider/useHighlighted.js +1 -0
- package/node/context/HighlightedProvider/useItemHighlighted.js +1 -0
- package/node/context/InteractionProvider.js +1 -0
- package/node/context/PluginProvider/PluginProvider.js +1 -0
- package/node/context/PluginProvider/useColorProcessor.js +1 -0
- package/node/context/PluginProvider/useSeriesFormatter.js +1 -0
- package/node/context/SeriesProvider/SeriesProvider.js +1 -0
- package/node/context/ZAxisContextProvider.js +1 -0
- package/node/hooks/useAxis.js +1 -0
- package/node/hooks/useAxisEvents.js +1 -0
- package/node/hooks/useChartDimensions.js +1 -0
- package/node/hooks/useChartId.js +1 -0
- package/node/hooks/useColorScale.js +1 -0
- package/node/hooks/useDrawingArea.js +1 -0
- package/node/hooks/useInteractionItemProps.js +1 -0
- package/node/hooks/useMounted.js +1 -0
- package/node/hooks/useReducedMotion.js +1 -0
- package/node/hooks/useScale.js +1 -0
- package/node/hooks/useSeries.js +1 -0
- package/node/hooks/useSvgRef.js +1 -0
- package/node/hooks/useTicks.js +1 -0
- package/node/index.js +1 -1
- package/package.json +3 -3
- package/internals/warning.d.ts +0 -2
- package/internals/warning.js +0 -21
- package/modern/internals/warning.js +0 -21
- package/node/internals/warning.js +0 -28
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useRtl } from '@mui/system/RtlProvider';
|
|
5
|
+
import { ChartsText } from "../ChartsText/index.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* @ignore - internal component.
|
|
9
|
+
*/
|
|
10
|
+
function ChartsLegendItem(props) {
|
|
11
|
+
const isRTL = useRtl();
|
|
12
|
+
const {
|
|
13
|
+
id,
|
|
14
|
+
positionY,
|
|
15
|
+
label,
|
|
16
|
+
positionX,
|
|
17
|
+
innerHeight,
|
|
18
|
+
innerWidth,
|
|
19
|
+
legendWidth,
|
|
20
|
+
color,
|
|
21
|
+
gapX,
|
|
22
|
+
gapY,
|
|
23
|
+
itemMarkHeight,
|
|
24
|
+
itemMarkWidth,
|
|
25
|
+
markGap,
|
|
26
|
+
labelStyle,
|
|
27
|
+
classes,
|
|
28
|
+
onClick
|
|
29
|
+
} = props;
|
|
30
|
+
return /*#__PURE__*/_jsxs("g", {
|
|
31
|
+
className: clsx(classes?.series, `${classes?.series}-${id}`),
|
|
32
|
+
transform: `translate(${gapX + (isRTL ? legendWidth - positionX : positionX)} ${gapY + positionY})`,
|
|
33
|
+
children: [/*#__PURE__*/_jsx("rect", {
|
|
34
|
+
x: isRTL ? -(innerWidth + 2) : -2,
|
|
35
|
+
y: -itemMarkHeight / 2 - 2,
|
|
36
|
+
width: innerWidth + 4,
|
|
37
|
+
height: innerHeight + 4,
|
|
38
|
+
fill: "transparent",
|
|
39
|
+
className: classes?.itemBackground,
|
|
40
|
+
onClick: onClick,
|
|
41
|
+
style: {
|
|
42
|
+
pointerEvents: onClick ? 'all' : 'none',
|
|
43
|
+
cursor: onClick ? 'pointer' : 'unset'
|
|
44
|
+
}
|
|
45
|
+
}), /*#__PURE__*/_jsx("rect", {
|
|
46
|
+
className: classes?.mark,
|
|
47
|
+
x: isRTL ? -itemMarkWidth : 0,
|
|
48
|
+
y: -itemMarkHeight / 2,
|
|
49
|
+
width: itemMarkWidth,
|
|
50
|
+
height: itemMarkHeight,
|
|
51
|
+
fill: color,
|
|
52
|
+
style: {
|
|
53
|
+
pointerEvents: 'none'
|
|
54
|
+
}
|
|
55
|
+
}), /*#__PURE__*/_jsx(ChartsText, {
|
|
56
|
+
style: _extends({
|
|
57
|
+
pointerEvents: 'none'
|
|
58
|
+
}, labelStyle),
|
|
59
|
+
text: label,
|
|
60
|
+
x: (isRTL ? -1 : 1) * (itemMarkWidth + markGap),
|
|
61
|
+
y: 0
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
export { ChartsLegendItem };
|
|
@@ -1,21 +1,32 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["drawingArea", "seriesToDisplay", "hidden"];
|
|
5
|
+
const _excluded = ["drawingArea", "seriesToDisplay", "hidden", "onItemClick"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import { LegendPerItem } from "./LegendPerItem.js";
|
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
const seriesContextBuilder = context => ({
|
|
11
|
+
type: 'series',
|
|
12
|
+
color: context.color,
|
|
13
|
+
label: context.label,
|
|
14
|
+
seriesId: context.seriesId,
|
|
15
|
+
itemId: context.itemId
|
|
16
|
+
});
|
|
8
17
|
function DefaultChartsLegend(props) {
|
|
9
18
|
const {
|
|
10
19
|
seriesToDisplay,
|
|
11
|
-
hidden
|
|
20
|
+
hidden,
|
|
21
|
+
onItemClick
|
|
12
22
|
} = props,
|
|
13
23
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
14
24
|
if (hidden) {
|
|
15
25
|
return null;
|
|
16
26
|
}
|
|
17
27
|
return /*#__PURE__*/_jsx(LegendPerItem, _extends({}, other, {
|
|
18
|
-
itemsToDisplay: seriesToDisplay
|
|
28
|
+
itemsToDisplay: seriesToDisplay,
|
|
29
|
+
onItemClick: onItemClick ? (e, i) => onItemClick(e, seriesContextBuilder(seriesToDisplay[i]), i) : undefined
|
|
19
30
|
}));
|
|
20
31
|
}
|
|
21
32
|
process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
@@ -73,6 +84,13 @@ process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
|
73
84
|
* @default 5
|
|
74
85
|
*/
|
|
75
86
|
markGap: PropTypes.number,
|
|
87
|
+
/**
|
|
88
|
+
* Callback fired when a legend item is clicked.
|
|
89
|
+
* @param {React.MouseEvent<SVGRectElement, MouseEvent>} event The click event.
|
|
90
|
+
* @param {SeriesLegendItemContext} legendItem The legend item data.
|
|
91
|
+
* @param {number} index The index of the clicked legend item.
|
|
92
|
+
*/
|
|
93
|
+
onItemClick: PropTypes.func,
|
|
76
94
|
/**
|
|
77
95
|
* Legend padding (in px).
|
|
78
96
|
* Can either be a single number, or an object with top, left, bottom, right properties.
|
|
@@ -95,7 +113,11 @@ process.env.NODE_ENV !== "production" ? DefaultChartsLegend.propTypes = {
|
|
|
95
113
|
seriesToDisplay: PropTypes.arrayOf(PropTypes.shape({
|
|
96
114
|
color: PropTypes.string.isRequired,
|
|
97
115
|
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
98
|
-
|
|
116
|
+
itemId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
117
|
+
label: PropTypes.string.isRequired,
|
|
118
|
+
maxValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
119
|
+
minValue: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
|
|
120
|
+
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
99
121
|
})).isRequired
|
|
100
122
|
} : void 0;
|
|
101
123
|
export { DefaultChartsLegend };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
5
|
const _excluded = ["rotate", "dominantBaseline"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import NoSsr from '@mui/material/NoSsr';
|
|
6
8
|
import { useTheme, styled } from '@mui/material/styles';
|
|
7
|
-
import { useRtl } from '@mui/system/RtlProvider';
|
|
8
|
-
import { ChartsText } from "../ChartsText/index.js";
|
|
9
9
|
import { getWordsByLines } from "../internals/getWordsByLines.js";
|
|
10
10
|
import { legendItemPlacements } from "./legendItemsPlacement.js";
|
|
11
11
|
import { useDrawingArea } from "../hooks/useDrawingArea.js";
|
|
12
|
-
import {
|
|
12
|
+
import { ChartsLegendItem } from "./ChartsLegendItem.js";
|
|
13
|
+
import { createElement as _createElement } from "react";
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
15
|
export const ChartsLegendRoot = styled('g', {
|
|
14
16
|
name: 'MuiChartsLegend',
|
|
15
17
|
slot: 'Root',
|
|
@@ -51,10 +53,10 @@ export function LegendPerItem(props) {
|
|
|
51
53
|
markGap = 5,
|
|
52
54
|
itemGap = 10,
|
|
53
55
|
padding: paddingProps = 10,
|
|
54
|
-
labelStyle: inLabelStyle
|
|
56
|
+
labelStyle: inLabelStyle,
|
|
57
|
+
onItemClick
|
|
55
58
|
} = props;
|
|
56
59
|
const theme = useTheme();
|
|
57
|
-
const isRtl = useRtl();
|
|
58
60
|
const drawingArea = useDrawingArea();
|
|
59
61
|
const labelStyle = React.useMemo(() => _extends({}, theme.typography.subtitle1, {
|
|
60
62
|
color: 'inherit',
|
|
@@ -110,29 +112,18 @@ export function LegendPerItem(props) {
|
|
|
110
112
|
return /*#__PURE__*/_jsx(NoSsr, {
|
|
111
113
|
children: /*#__PURE__*/_jsx(ChartsLegendRoot, {
|
|
112
114
|
className: classes?.root,
|
|
113
|
-
children: itemsWithPosition.map(({
|
|
114
|
-
id,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
y: -itemMarkHeight / 2,
|
|
126
|
-
width: itemMarkWidth,
|
|
127
|
-
height: itemMarkHeight,
|
|
128
|
-
fill: color
|
|
129
|
-
}), /*#__PURE__*/_jsx(ChartsText, {
|
|
130
|
-
style: labelStyle,
|
|
131
|
-
text: label,
|
|
132
|
-
x: (isRtl ? -1 : 1) * (itemMarkWidth + markGap),
|
|
133
|
-
y: 0
|
|
134
|
-
})]
|
|
135
|
-
}, id))
|
|
115
|
+
children: itemsWithPosition.map((item, i) => /*#__PURE__*/_createElement(ChartsLegendItem, _extends({}, item, {
|
|
116
|
+
key: item.id,
|
|
117
|
+
gapX: gapX,
|
|
118
|
+
gapY: gapY,
|
|
119
|
+
legendWidth: legendWidth,
|
|
120
|
+
itemMarkHeight: itemMarkHeight,
|
|
121
|
+
itemMarkWidth: itemMarkWidth,
|
|
122
|
+
markGap: markGap,
|
|
123
|
+
labelStyle: labelStyle,
|
|
124
|
+
classes: classes,
|
|
125
|
+
onClick: onItemClick ? e => onItemClick(e, i) : undefined
|
|
126
|
+
})))
|
|
136
127
|
})
|
|
137
128
|
});
|
|
138
129
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["axisDirection", "axisId", "hideFirst", "hideLast", "labelFormatter"];
|
|
5
|
+
const _excluded = ["axisDirection", "axisId", "hideFirst", "hideLast", "labelFormatter", "onItemClick"];
|
|
4
6
|
import * as React from 'react';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
6
8
|
import { useAxis } from "./useAxis.js";
|
|
@@ -16,13 +18,21 @@ function defaultLabelFormatter(params) {
|
|
|
16
18
|
}
|
|
17
19
|
return `${params.formattedMin}-${params.formattedMax}`;
|
|
18
20
|
}
|
|
21
|
+
const piecewiseColorContextBuilder = context => ({
|
|
22
|
+
type: 'piecewiseColor',
|
|
23
|
+
color: context.color,
|
|
24
|
+
label: context.label,
|
|
25
|
+
maxValue: context.maxValue,
|
|
26
|
+
minValue: context.minValue
|
|
27
|
+
});
|
|
19
28
|
function PiecewiseColorLegend(props) {
|
|
20
29
|
const {
|
|
21
30
|
axisDirection,
|
|
22
31
|
axisId,
|
|
23
32
|
hideFirst,
|
|
24
33
|
hideLast,
|
|
25
|
-
labelFormatter = defaultLabelFormatter
|
|
34
|
+
labelFormatter = defaultLabelFormatter,
|
|
35
|
+
onItemClick
|
|
26
36
|
} = props,
|
|
27
37
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
28
38
|
const axisItem = useAxis({
|
|
@@ -43,30 +53,34 @@ function PiecewiseColorLegend(props) {
|
|
|
43
53
|
if (hideFirst && isFirst || hideLast && isLast) {
|
|
44
54
|
return null;
|
|
45
55
|
}
|
|
46
|
-
const
|
|
56
|
+
const data = _extends({}, isFirst ? {
|
|
47
57
|
min: null,
|
|
48
58
|
formattedMin: null
|
|
49
59
|
} : {
|
|
50
60
|
min: colorMap.thresholds[index - 1],
|
|
51
61
|
formattedMin: formattedLabels[index - 1]
|
|
52
|
-
},
|
|
62
|
+
}, isLast ? {
|
|
53
63
|
max: null,
|
|
54
64
|
formattedMax: null
|
|
55
65
|
} : {
|
|
56
66
|
max: colorMap.thresholds[index],
|
|
57
67
|
formattedMax: formattedLabels[index]
|
|
58
|
-
})
|
|
68
|
+
});
|
|
69
|
+
const label = labelFormatter(data);
|
|
59
70
|
if (label === null) {
|
|
60
71
|
return null;
|
|
61
72
|
}
|
|
62
73
|
return {
|
|
63
74
|
id: label,
|
|
64
75
|
color,
|
|
65
|
-
label
|
|
76
|
+
label,
|
|
77
|
+
minValue: data.min,
|
|
78
|
+
maxValue: data.max
|
|
66
79
|
};
|
|
67
80
|
}).filter(notNull);
|
|
68
81
|
return /*#__PURE__*/_jsx(LegendPerItem, _extends({}, other, {
|
|
69
|
-
itemsToDisplay: itemsToDisplay
|
|
82
|
+
itemsToDisplay: itemsToDisplay,
|
|
83
|
+
onItemClick: onItemClick ? (e, i) => onItemClick(e, piecewiseColorContextBuilder(itemsToDisplay[i]), i) : undefined
|
|
70
84
|
}));
|
|
71
85
|
}
|
|
72
86
|
process.env.NODE_ENV !== "production" ? PiecewiseColorLegend.propTypes = {
|
|
@@ -134,6 +148,13 @@ process.env.NODE_ENV !== "production" ? PiecewiseColorLegend.propTypes = {
|
|
|
134
148
|
* @default 5
|
|
135
149
|
*/
|
|
136
150
|
markGap: PropTypes.number,
|
|
151
|
+
/**
|
|
152
|
+
* Callback fired when a legend item is clicked.
|
|
153
|
+
* @param {React.MouseEvent<SVGRectElement, MouseEvent>} event The click event.
|
|
154
|
+
* @param {PiecewiseColorLegendItemContext} legendItem The legend item data.
|
|
155
|
+
* @param {number} index The index of the clicked legend item.
|
|
156
|
+
*/
|
|
157
|
+
onItemClick: PropTypes.func,
|
|
137
158
|
/**
|
|
138
159
|
* Legend padding (in px).
|
|
139
160
|
* Can either be a single number, or an object with top, left, bottom, right properties.
|
|
@@ -2,4 +2,4 @@ import { unstable_generateUtilityClass as generateUtilityClass, unstable_generat
|
|
|
2
2
|
export function getLegendUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiChartsLegend', slot);
|
|
4
4
|
}
|
|
5
|
-
export const legendClasses = generateUtilityClasses('MuiChartsLegend', ['root', 'series', 'mark', 'label', 'column', 'row']);
|
|
5
|
+
export const legendClasses = generateUtilityClasses('MuiChartsLegend', ['root', 'series', 'itemBackground', 'mark', 'label', 'column', 'row']);
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import PropTypes from 'prop-types';
|
|
3
5
|
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
@@ -27,7 +29,7 @@ function ChartsOnAxisClickHandler(props) {
|
|
|
27
29
|
}
|
|
28
30
|
const handleMouseClick = event => {
|
|
29
31
|
event.preventDefault();
|
|
30
|
-
const isXaxis =
|
|
32
|
+
const isXaxis = axis.x && axis.x.index !== -1;
|
|
31
33
|
const USED_AXIS_ID = isXaxis ? xAxisIds[0] : yAxisIds[0];
|
|
32
34
|
const dataIndex = isXaxis ? axis.x && axis.x.index : axis.y && axis.y.index;
|
|
33
35
|
if (dataIndex == null) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import composeClasses from '@mui/utils/composeClasses';
|
|
6
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
4
7
|
import { useDrawingArea, useXScale } from "../hooks/index.js";
|
|
5
8
|
import { ReferenceLineRoot } from "./common.js";
|
|
6
9
|
import { ChartsText } from "../ChartsText/index.js";
|
|
7
10
|
import { getReferenceLineUtilityClass } from "./chartsReferenceLineClasses.js";
|
|
8
|
-
import { warnOnce } from "../internals/warning.js";
|
|
9
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
const getTextParams = ({
|
|
11
13
|
top,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import composeClasses from '@mui/utils/composeClasses';
|
|
6
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
4
7
|
import { useDrawingArea, useYScale } from "../hooks/index.js";
|
|
5
8
|
import { ReferenceLineRoot } from "./common.js";
|
|
6
9
|
import { ChartsText } from "../ChartsText/index.js";
|
|
7
10
|
import { getReferenceLineUtilityClass } from "./chartsReferenceLineClasses.js";
|
|
8
|
-
import { warnOnce } from "../internals/warning.js";
|
|
9
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
const getTextParams = ({
|
|
11
13
|
left,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["children", "width", "height", "viewBox", "disableAxisListener", "className", "title", "desc"];
|
package/modern/Gauge/Gauge.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["width", "height", "margin", "title", "desc", "value", "valueMin", "valueMax", "startAngle", "endAngle", "outerRadius", "innerRadius", "cornerRadius", "cx", "cy", "children"];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["id", "classes", "color", "gradientId", "slots", "slotProps", "onClick"];
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
+
const _excluded = ["x", "y", "id", "classes", "color", "dataIndex", "onClick", "skipAnimation", "shape"];
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { useTheme } from '@mui/material/styles';
|
|
9
|
+
import { warnOnce } from '@mui/x-internals/warning';
|
|
10
|
+
import { animated, useSpring } from '@react-spring/web';
|
|
11
|
+
import { InteractionContext } from "../context/InteractionProvider.js";
|
|
12
|
+
import { useInteractionItemProps } from "../hooks/useInteractionItemProps.js";
|
|
13
|
+
import { useItemHighlighted } from "../context/index.js";
|
|
14
|
+
import { useUtilityClasses } from "./markElementClasses.js";
|
|
15
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
|
+
/**
|
|
17
|
+
* The line mark element that only render circle for performance improvement.
|
|
18
|
+
*
|
|
19
|
+
* Demos:
|
|
20
|
+
*
|
|
21
|
+
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
22
|
+
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
23
|
+
*
|
|
24
|
+
* API:
|
|
25
|
+
*
|
|
26
|
+
* - [CircleMarkElement API](https://mui.com/x/api/charts/circle-mark-element/)
|
|
27
|
+
*/
|
|
28
|
+
function CircleMarkElement(props) {
|
|
29
|
+
const {
|
|
30
|
+
x,
|
|
31
|
+
y,
|
|
32
|
+
id,
|
|
33
|
+
classes: innerClasses,
|
|
34
|
+
color,
|
|
35
|
+
dataIndex,
|
|
36
|
+
onClick,
|
|
37
|
+
skipAnimation,
|
|
38
|
+
shape
|
|
39
|
+
} = props,
|
|
40
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
41
|
+
if (shape !== 'circle') {
|
|
42
|
+
warnOnce([`MUI X: The mark element of your line chart have shape "${shape}" which is not supported when using \`experimentalRendering=true\`.`, 'Only "circle" are supported with `experimentalRendering`.'].join('\n'), 'error');
|
|
43
|
+
}
|
|
44
|
+
const theme = useTheme();
|
|
45
|
+
const getInteractionItemProps = useInteractionItemProps();
|
|
46
|
+
const {
|
|
47
|
+
isFaded,
|
|
48
|
+
isHighlighted
|
|
49
|
+
} = useItemHighlighted({
|
|
50
|
+
seriesId: id
|
|
51
|
+
});
|
|
52
|
+
const {
|
|
53
|
+
axis
|
|
54
|
+
} = React.useContext(InteractionContext);
|
|
55
|
+
const position = useSpring({
|
|
56
|
+
to: {
|
|
57
|
+
x,
|
|
58
|
+
y
|
|
59
|
+
},
|
|
60
|
+
immediate: skipAnimation
|
|
61
|
+
});
|
|
62
|
+
const ownerState = {
|
|
63
|
+
id,
|
|
64
|
+
classes: innerClasses,
|
|
65
|
+
isHighlighted: axis.x?.index === dataIndex || isHighlighted,
|
|
66
|
+
isFaded,
|
|
67
|
+
color
|
|
68
|
+
};
|
|
69
|
+
const classes = useUtilityClasses(ownerState);
|
|
70
|
+
return /*#__PURE__*/_jsx(animated.circle, _extends({}, other, {
|
|
71
|
+
cx: position.x,
|
|
72
|
+
cy: position.y,
|
|
73
|
+
r: 5,
|
|
74
|
+
fill: (theme.vars || theme).palette.background.paper,
|
|
75
|
+
stroke: color,
|
|
76
|
+
strokeWidth: 2,
|
|
77
|
+
className: classes.root,
|
|
78
|
+
onClick: onClick,
|
|
79
|
+
cursor: onClick ? 'pointer' : 'unset'
|
|
80
|
+
}, getInteractionItemProps({
|
|
81
|
+
type: 'line',
|
|
82
|
+
seriesId: id,
|
|
83
|
+
dataIndex
|
|
84
|
+
})));
|
|
85
|
+
}
|
|
86
|
+
process.env.NODE_ENV !== "production" ? CircleMarkElement.propTypes = {
|
|
87
|
+
// ----------------------------- Warning --------------------------------
|
|
88
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
89
|
+
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
90
|
+
// ----------------------------------------------------------------------
|
|
91
|
+
classes: PropTypes.object,
|
|
92
|
+
/**
|
|
93
|
+
* The index to the element in the series' data array.
|
|
94
|
+
*/
|
|
95
|
+
dataIndex: PropTypes.number.isRequired,
|
|
96
|
+
id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
97
|
+
/**
|
|
98
|
+
* The shape of the marker.
|
|
99
|
+
*/
|
|
100
|
+
shape: PropTypes.oneOf(['circle', 'cross', 'diamond', 'square', 'star', 'triangle', 'wye']).isRequired,
|
|
101
|
+
/**
|
|
102
|
+
* If `true`, animations are skipped.
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
105
|
+
skipAnimation: PropTypes.bool
|
|
106
|
+
} : void 0;
|
|
107
|
+
export { CircleMarkElement };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import PropTypes from 'prop-types';
|
|
@@ -102,6 +104,10 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
102
104
|
* If `true`, render the line highlight item.
|
|
103
105
|
*/
|
|
104
106
|
disableLineItemHighlight: PropTypes.bool,
|
|
107
|
+
/**
|
|
108
|
+
* If `true` marks will render `<circle />` instead of `<path />` and drop theme override for faster rendering.
|
|
109
|
+
*/
|
|
110
|
+
experimentalMarkRendering: PropTypes.bool,
|
|
105
111
|
/**
|
|
106
112
|
* Option to display a cartesian grid in the background.
|
|
107
113
|
*/
|
|
@@ -138,6 +144,7 @@ process.env.NODE_ENV !== "production" ? LineChart.propTypes = {
|
|
|
138
144
|
itemMarkWidth: PropTypes.number,
|
|
139
145
|
labelStyle: PropTypes.object,
|
|
140
146
|
markGap: PropTypes.number,
|
|
147
|
+
onItemClick: PropTypes.func,
|
|
141
148
|
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
142
149
|
bottom: PropTypes.number,
|
|
143
150
|
left: PropTypes.number,
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["id", "classes", "color", "gradientId", "slots", "slotProps", "onClick"];
|