@mui/x-charts 8.0.0-alpha.6 → 8.0.0-alpha.7
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/AnimatedBarElement.js +1 -0
- package/BarChart/BarChart.js +17 -7
- package/BarChart/BarLabel/BarLabel.d.ts +1 -479
- package/BarChart/BarLabel/barLabelClasses.d.ts +1 -1
- package/BarChart/legend.js +1 -0
- package/BarChart/useBarChartProps.d.ts +4 -2
- package/BarChart/useBarChartProps.js +16 -3
- package/CHANGELOG.md +127 -1
- package/ChartsLabel/ChartsLabel.d.ts +2 -3
- package/ChartsLabel/ChartsLabel.js +3 -18
- package/ChartsLabel/ChartsLabelGradient.d.ts +9 -8
- package/ChartsLabel/ChartsLabelGradient.js +21 -18
- package/ChartsLabel/ChartsLabelMark.d.ts +2 -3
- package/ChartsLabel/ChartsLabelMark.js +5 -2
- package/ChartsLabel/index.d.ts +7 -0
- package/ChartsLabel/index.js +6 -0
- package/ChartsLabel/labelClasses.d.ts +0 -1
- package/ChartsLabel/labelGradientClasses.d.ts +5 -4
- package/ChartsLabel/labelGradientClasses.js +3 -2
- package/ChartsLabel/labelMarkClasses.d.ts +3 -2
- package/ChartsLabel/labelMarkClasses.js +3 -2
- package/ChartsLabel/package.json +6 -0
- package/ChartsLegend/ChartsLegend.d.ts +18 -22
- package/ChartsLegend/ChartsLegend.js +100 -109
- package/ChartsLegend/ContinuousColorLegend.d.ts +29 -38
- package/ChartsLegend/ContinuousColorLegend.js +198 -321
- package/ChartsLegend/PiecewiseColorLegend.d.ts +27 -19
- package/ChartsLegend/PiecewiseColorLegend.js +201 -111
- package/ChartsLegend/chartsLegend.types.d.ts +17 -60
- package/ChartsLegend/chartsLegendClasses.d.ts +7 -8
- package/ChartsLegend/chartsLegendClasses.js +16 -2
- package/ChartsLegend/colorLegend.types.d.ts +13 -0
- package/ChartsLegend/colorLegend.types.js +1 -0
- package/ChartsLegend/continuousColorLegendClasses.d.ts +26 -0
- package/ChartsLegend/continuousColorLegendClasses.js +23 -0
- package/ChartsLegend/direction.d.ts +1 -0
- package/ChartsLegend/direction.js +1 -0
- package/ChartsLegend/index.d.ts +13 -3
- package/ChartsLegend/index.js +9 -3
- package/ChartsLegend/legend.types.d.ts +10 -54
- package/ChartsLegend/legendContext.types.d.ts +55 -0
- package/ChartsLegend/legendContext.types.js +1 -0
- package/ChartsLegend/onClickContextBuilder.d.ts +2 -0
- package/ChartsLegend/onClickContextBuilder.js +7 -0
- package/ChartsLegend/piecewiseColorDefaultLabelFormatter.d.ts +2 -0
- package/ChartsLegend/piecewiseColorDefaultLabelFormatter.js +9 -0
- package/ChartsLegend/piecewiseColorLegend.types.d.ts +26 -0
- package/ChartsLegend/piecewiseColorLegend.types.js +1 -0
- package/ChartsLegend/piecewiseColorLegendClasses.d.ts +28 -0
- package/ChartsLegend/piecewiseColorLegendClasses.js +23 -0
- package/ChartsLegend/useAxis.d.ts +1 -1
- package/ChartsLegend/useAxis.js +0 -1
- package/ChartsReferenceLine/ChartsXReferenceLine.d.ts +1 -1
- package/ChartsReferenceLine/ChartsYReferenceLine.d.ts +1 -1
- package/ChartsSurface/ChartsSurface.js +0 -1
- package/ChartsTooltip/chartsTooltipClasses.d.ts +1 -1
- package/LineChart/AnimatedArea.js +1 -0
- package/LineChart/AnimatedLine.js +1 -0
- package/LineChart/AppearingMask.js +1 -0
- package/LineChart/CircleMarkElement.js +1 -0
- package/LineChart/LineChart.js +20 -10
- package/LineChart/MarkElement.js +3 -1
- package/LineChart/legend.js +1 -0
- package/LineChart/useLineChartProps.d.ts +4 -2
- package/LineChart/useLineChartProps.js +15 -2
- package/PieChart/PieArc.js +3 -1
- package/PieChart/PieArcLabel.js +13 -9
- package/PieChart/PieArcLabelPlot.js +1 -0
- package/PieChart/PieArcPlot.js +1 -0
- package/PieChart/PieChart.js +42 -41
- package/PieChart/legend.js +1 -0
- package/ScatterChart/ScatterChart.js +21 -11
- package/ScatterChart/legend.js +1 -0
- package/ScatterChart/useScatterChartProps.d.ts +4 -2
- package/ScatterChart/useScatterChartProps.js +15 -2
- package/SparkLineChart/SparkLineChart.js +1 -4
- package/constants/index.d.ts +1 -0
- package/constants/index.js +2 -1
- package/context/CartesianProvider/defaultizeAxis.d.ts +9 -9
- package/context/ChartDataProvider/useChartDataProviderProps.d.ts +18 -18
- package/context/ChartDataProvider/useDefaultizeAxis.d.ts +9 -9
- package/context/ChartProvider/ChartProvider.types.d.ts +1 -1
- package/context/InteractionSelectors.d.ts +11 -11
- package/context/PluginProvider/SeriesFormatter.types.d.ts +1 -1
- package/context/PluginProvider/mergePlugins.d.ts +8 -8
- package/context/SizeProvider/Size.types.d.ts +1 -1
- package/context/SizeProvider/useChartContainerDimensions.d.ts +1 -1
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +2 -1
- package/hooks/useLegend.d.ts +13 -0
- package/{modern/ChartsLegend/utils.js → hooks/useLegend.js} +20 -1
- package/hooks/useSvgRef.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.js +2 -1
- package/internals/calculateMargins.d.ts +7 -0
- package/internals/calculateMargins.js +25 -0
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.d.ts +2 -1
- package/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +60 -16
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +6 -6
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.d.ts +13 -0
- package/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +61 -0
- package/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +3 -0
- package/internals/components/ChartsWrapper/ChartsWrapper.d.ts +17 -0
- package/internals/components/ChartsWrapper/ChartsWrapper.js +66 -0
- package/internals/components/ChartsWrapper/index.d.ts +1 -0
- package/internals/components/ChartsWrapper/index.js +1 -0
- package/internals/consumeSlots.d.ts +48 -0
- package/internals/consumeSlots.js +101 -0
- package/internals/consumeThemeProps.d.ts +3 -7
- package/internals/consumeThemeProps.js +18 -27
- package/internals/defaultizeColor.d.ts +6 -1
- package/internals/index.d.ts +1 -0
- package/internals/index.js +1 -0
- package/internals/plugins/corePlugins/useChartId/useChartId.selectors.d.ts +1 -1
- package/internals/plugins/featurePlugins/useChartInteraction/useChartInteraction.selectors.d.ts +11 -11
- package/internals/plugins/models/plugin.d.ts +1 -1
- package/internals/store/useCharts.d.ts +2 -2
- package/internals/store/useCharts.types.d.ts +1 -1
- package/models/seriesType/common.d.ts +9 -0
- package/models/seriesType/pie.d.ts +9 -0
- package/modern/BarChart/AnimatedBarElement.js +1 -0
- package/modern/BarChart/BarChart.js +17 -7
- package/modern/BarChart/legend.js +1 -0
- package/modern/BarChart/useBarChartProps.js +16 -3
- package/modern/ChartsLabel/ChartsLabel.js +3 -18
- package/modern/ChartsLabel/ChartsLabelGradient.js +21 -18
- package/modern/ChartsLabel/ChartsLabelMark.js +5 -2
- package/modern/ChartsLabel/index.js +6 -0
- package/modern/ChartsLabel/labelGradientClasses.js +3 -2
- package/modern/ChartsLabel/labelMarkClasses.js +3 -2
- package/modern/ChartsLegend/ChartsLegend.js +100 -109
- package/modern/ChartsLegend/ContinuousColorLegend.js +198 -321
- package/modern/ChartsLegend/PiecewiseColorLegend.js +201 -111
- package/modern/ChartsLegend/chartsLegendClasses.js +16 -2
- package/modern/ChartsLegend/colorLegend.types.js +1 -0
- package/modern/ChartsLegend/continuousColorLegendClasses.js +23 -0
- package/modern/ChartsLegend/direction.js +1 -0
- package/modern/ChartsLegend/index.js +9 -3
- package/modern/ChartsLegend/legendContext.types.js +1 -0
- package/modern/ChartsLegend/onClickContextBuilder.js +7 -0
- package/modern/ChartsLegend/piecewiseColorDefaultLabelFormatter.js +9 -0
- package/modern/ChartsLegend/piecewiseColorLegend.types.js +1 -0
- package/modern/ChartsLegend/piecewiseColorLegendClasses.js +23 -0
- package/modern/ChartsLegend/useAxis.js +0 -1
- package/modern/ChartsSurface/ChartsSurface.js +0 -1
- package/modern/LineChart/AnimatedArea.js +1 -0
- package/modern/LineChart/AnimatedLine.js +1 -0
- package/modern/LineChart/AppearingMask.js +1 -0
- package/modern/LineChart/CircleMarkElement.js +1 -0
- package/modern/LineChart/LineChart.js +20 -10
- package/modern/LineChart/MarkElement.js +3 -1
- package/modern/LineChart/legend.js +1 -0
- package/modern/LineChart/useLineChartProps.js +15 -2
- package/modern/PieChart/PieArc.js +3 -1
- package/modern/PieChart/PieArcLabel.js +13 -9
- package/modern/PieChart/PieArcLabelPlot.js +1 -0
- package/modern/PieChart/PieArcPlot.js +1 -0
- package/modern/PieChart/PieChart.js +42 -41
- package/modern/PieChart/legend.js +1 -0
- package/modern/ScatterChart/ScatterChart.js +21 -11
- package/modern/ScatterChart/legend.js +1 -0
- package/modern/ScatterChart/useScatterChartProps.js +15 -2
- package/modern/SparkLineChart/SparkLineChart.js +1 -4
- package/modern/constants/index.js +2 -1
- package/modern/hooks/index.js +2 -1
- package/{ChartsLegend/utils.js → modern/hooks/useLegend.js} +20 -1
- package/modern/index.js +2 -1
- package/modern/internals/calculateMargins.js +25 -0
- package/modern/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +60 -16
- package/modern/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +6 -6
- package/modern/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +61 -0
- package/modern/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +3 -0
- package/modern/internals/components/ChartsWrapper/ChartsWrapper.js +66 -0
- package/modern/internals/components/ChartsWrapper/index.js +1 -0
- package/modern/internals/consumeSlots.js +101 -0
- package/modern/internals/consumeThemeProps.js +18 -27
- package/modern/internals/index.js +1 -0
- package/node/BarChart/AnimatedBarElement.js +1 -0
- package/node/BarChart/BarChart.js +17 -7
- package/node/BarChart/legend.js +1 -0
- package/node/BarChart/useBarChartProps.js +15 -3
- package/node/ChartsLabel/ChartsLabel.js +3 -18
- package/node/ChartsLabel/ChartsLabelGradient.js +21 -18
- package/node/ChartsLabel/ChartsLabelMark.js +5 -2
- package/node/ChartsLabel/index.js +26 -0
- package/node/ChartsLabel/labelGradientClasses.js +3 -2
- package/node/ChartsLabel/labelMarkClasses.js +3 -2
- package/node/ChartsLegend/ChartsLegend.js +99 -108
- package/node/ChartsLegend/ContinuousColorLegend.js +199 -322
- package/node/ChartsLegend/PiecewiseColorLegend.js +201 -111
- package/node/ChartsLegend/chartsLegendClasses.js +17 -3
- package/node/ChartsLegend/colorLegend.types.js +5 -0
- package/node/ChartsLegend/continuousColorLegendClasses.js +31 -0
- package/node/ChartsLegend/direction.js +5 -0
- package/node/ChartsLegend/index.js +80 -16
- package/node/ChartsLegend/legendContext.types.js +5 -0
- package/node/ChartsLegend/onClickContextBuilder.js +14 -0
- package/node/ChartsLegend/piecewiseColorDefaultLabelFormatter.js +15 -0
- package/node/ChartsLegend/piecewiseColorLegend.types.js +5 -0
- package/node/ChartsLegend/piecewiseColorLegendClasses.js +31 -0
- package/node/ChartsSurface/ChartsSurface.js +0 -1
- package/node/LineChart/AnimatedArea.js +1 -0
- package/node/LineChart/AnimatedLine.js +1 -0
- package/node/LineChart/AppearingMask.js +1 -0
- package/node/LineChart/CircleMarkElement.js +1 -0
- package/node/LineChart/LineChart.js +20 -10
- package/node/LineChart/MarkElement.js +3 -1
- package/node/LineChart/legend.js +1 -0
- package/node/LineChart/useLineChartProps.js +14 -2
- package/node/PieChart/PieArc.js +3 -1
- package/node/PieChart/PieArcLabel.js +13 -9
- package/node/PieChart/PieArcLabelPlot.js +1 -0
- package/node/PieChart/PieArcPlot.js +1 -0
- package/node/PieChart/PieChart.js +42 -41
- package/node/PieChart/legend.js +1 -0
- package/node/ScatterChart/ScatterChart.js +21 -11
- package/node/ScatterChart/legend.js +1 -0
- package/node/ScatterChart/useScatterChartProps.js +14 -2
- package/node/SparkLineChart/SparkLineChart.js +1 -4
- package/node/constants/index.js +3 -2
- package/node/hooks/index.js +13 -1
- package/node/{ChartsLegend/utils.js → hooks/useLegend.js} +19 -1
- package/node/index.js +12 -1
- package/node/internals/calculateMargins.js +33 -0
- package/node/internals/components/ChartsAxesGradients/ChartsAxesGradients.js +61 -16
- package/node/internals/components/ChartsAxesGradients/ChartsContinuousGradient.js +6 -6
- package/node/internals/components/ChartsAxesGradients/ChartsContinuousGradientObjectBound.js +69 -0
- package/node/internals/components/ChartsAxesGradients/ChartsPiecewiseGradient.js +3 -0
- package/node/internals/components/ChartsWrapper/ChartsWrapper.js +72 -0
- package/node/internals/components/ChartsWrapper/index.js +16 -0
- package/node/internals/consumeSlots.js +109 -0
- package/node/internals/consumeThemeProps.js +18 -27
- package/node/internals/index.js +12 -0
- package/package.json +4 -4
- package/ChartsLegend/ChartsLegendItem.d.ts +0 -26
- package/ChartsLegend/ChartsLegendItem.js +0 -65
- package/ChartsLegend/DefaultChartsLegend.d.ts +0 -25
- package/ChartsLegend/DefaultChartsLegend.js +0 -112
- package/ChartsLegend/LegendPerItem.d.ts +0 -65
- package/ChartsLegend/LegendPerItem.js +0 -129
- package/ChartsLegend/legendItemsPlacement.d.ts +0 -3
- package/ChartsLegend/legendItemsPlacement.js +0 -72
- package/ChartsLegend/utils.d.ts +0 -2
- package/modern/ChartsLegend/ChartsLegendItem.js +0 -65
- package/modern/ChartsLegend/DefaultChartsLegend.js +0 -112
- package/modern/ChartsLegend/LegendPerItem.js +0 -129
- package/modern/ChartsLegend/legendItemsPlacement.js +0 -72
- package/node/ChartsLegend/ChartsLegendItem.js +0 -72
- package/node/ChartsLegend/DefaultChartsLegend.js +0 -118
- package/node/ChartsLegend/LegendPerItem.js +0 -137
- package/node/ChartsLegend/legendItemsPlacement.js +0 -79
|
@@ -1,40 +1,130 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
3
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
|
|
4
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
|
+
const _excluded = ["direction", "classes", "className", "markType", "labelPosition", "axisDirection", "axisId", "labelFormatter", "onItemClick"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
+
import { styled } from '@mui/material/styles';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import { ChartsLabel } from "../ChartsLabel/ChartsLabel.js";
|
|
11
|
+
import { ChartsLabelMark } from "../ChartsLabel/ChartsLabelMark.js";
|
|
12
|
+
import { consumeThemeProps } from "../internals/consumeThemeProps.js";
|
|
13
|
+
import { piecewiseColorLegendClasses, useUtilityClasses } from "./piecewiseColorLegendClasses.js";
|
|
8
14
|
import { useAxis } from "./useAxis.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
import { piecewiseColorDefaultLabelFormatter } from "./piecewiseColorDefaultLabelFormatter.js";
|
|
16
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
|
+
const RootElement = styled('ul', {
|
|
18
|
+
name: 'MuiPiecewiseColorLegend',
|
|
19
|
+
slot: 'Root',
|
|
20
|
+
overridesResolver: (props, styles) => styles.root
|
|
21
|
+
})(({
|
|
22
|
+
theme,
|
|
23
|
+
ownerState
|
|
24
|
+
}) => {
|
|
25
|
+
return _extends({}, theme.typography.caption, {
|
|
26
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
27
|
+
lineHeight: '100%',
|
|
28
|
+
display: 'flex',
|
|
29
|
+
flexDirection: ownerState.direction === 'vertical' ? 'column' : 'row',
|
|
30
|
+
flexShrink: 0,
|
|
31
|
+
gap: theme.spacing(0.5),
|
|
32
|
+
listStyleType: 'none',
|
|
33
|
+
paddingInlineStart: 0,
|
|
34
|
+
marginBlock: theme.spacing(1),
|
|
35
|
+
marginInline: theme.spacing(1),
|
|
36
|
+
width: 'max-content',
|
|
37
|
+
[`button.${piecewiseColorLegendClasses.item}`]: {
|
|
38
|
+
// Reset button styles
|
|
39
|
+
background: 'none',
|
|
40
|
+
border: 'none',
|
|
41
|
+
padding: 0,
|
|
42
|
+
cursor: ownerState.onItemClick ? 'pointer' : 'unset',
|
|
43
|
+
fontFamily: 'inherit',
|
|
44
|
+
fontWeight: 'inherit',
|
|
45
|
+
fontSize: 'inherit',
|
|
46
|
+
letterSpacing: 'inherit',
|
|
47
|
+
color: 'inherit'
|
|
48
|
+
},
|
|
49
|
+
[`.${piecewiseColorLegendClasses.item}`]: {
|
|
50
|
+
display: 'flex',
|
|
51
|
+
gap: theme.spacing(0.5)
|
|
52
|
+
},
|
|
53
|
+
[`li :not(.${piecewiseColorLegendClasses.minLabel}, .${piecewiseColorLegendClasses.maxLabel}) .${piecewiseColorLegendClasses?.mark}`]: {
|
|
54
|
+
alignSelf: 'center'
|
|
55
|
+
},
|
|
56
|
+
[`&.${piecewiseColorLegendClasses.start}`]: {
|
|
57
|
+
alignItems: 'end'
|
|
58
|
+
},
|
|
59
|
+
[`&.${piecewiseColorLegendClasses.end}`]: {
|
|
60
|
+
alignItems: 'start'
|
|
61
|
+
},
|
|
62
|
+
[`&.${piecewiseColorLegendClasses.horizontal}`]: {
|
|
63
|
+
alignItems: 'center',
|
|
64
|
+
[`.${piecewiseColorLegendClasses.item}`]: {
|
|
65
|
+
flexDirection: 'column'
|
|
66
|
+
},
|
|
67
|
+
[`&.${piecewiseColorLegendClasses.start}`]: {
|
|
68
|
+
alignItems: 'end'
|
|
69
|
+
},
|
|
70
|
+
[`&.${piecewiseColorLegendClasses.end}`]: {
|
|
71
|
+
alignItems: 'start'
|
|
72
|
+
},
|
|
73
|
+
[`.${piecewiseColorLegendClasses.minLabel}`]: {
|
|
74
|
+
alignItems: 'end'
|
|
75
|
+
},
|
|
76
|
+
[`&.${piecewiseColorLegendClasses.extremes}`]: {
|
|
77
|
+
[`.${piecewiseColorLegendClasses.minLabel}, .${piecewiseColorLegendClasses.maxLabel}`]: {
|
|
78
|
+
alignItems: 'center',
|
|
79
|
+
display: 'flex',
|
|
80
|
+
flexDirection: 'row'
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
[`&.${piecewiseColorLegendClasses.vertical}`]: {
|
|
85
|
+
[`.${piecewiseColorLegendClasses.item}`]: {
|
|
86
|
+
flexDirection: 'row',
|
|
87
|
+
alignItems: 'center'
|
|
88
|
+
},
|
|
89
|
+
[`&.${piecewiseColorLegendClasses.start}`]: {
|
|
90
|
+
alignItems: 'end'
|
|
91
|
+
},
|
|
92
|
+
[`&.${piecewiseColorLegendClasses.end}`]: {
|
|
93
|
+
alignItems: 'start'
|
|
94
|
+
},
|
|
95
|
+
[`&.${piecewiseColorLegendClasses.extremes}`]: {
|
|
96
|
+
alignItems: 'center',
|
|
97
|
+
[`.${piecewiseColorLegendClasses.minLabel}, .${piecewiseColorLegendClasses.maxLabel}`]: {
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
display: 'flex',
|
|
100
|
+
flexDirection: 'column'
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
});
|
|
27
105
|
});
|
|
28
|
-
|
|
106
|
+
const PiecewiseColorLegend = consumeThemeProps('MuiPiecewiseColorLegend', {
|
|
107
|
+
defaultProps: {
|
|
108
|
+
direction: 'horizontal',
|
|
109
|
+
labelPosition: 'extremes',
|
|
110
|
+
labelFormatter: piecewiseColorDefaultLabelFormatter
|
|
111
|
+
},
|
|
112
|
+
classesResolver: useUtilityClasses
|
|
113
|
+
}, function PiecewiseColorLegend(props, ref) {
|
|
29
114
|
const {
|
|
115
|
+
direction,
|
|
116
|
+
classes,
|
|
117
|
+
className,
|
|
118
|
+
markType,
|
|
119
|
+
labelPosition,
|
|
30
120
|
axisDirection,
|
|
31
121
|
axisId,
|
|
32
|
-
|
|
33
|
-
hideLast,
|
|
34
|
-
labelFormatter = defaultLabelFormatter,
|
|
122
|
+
labelFormatter,
|
|
35
123
|
onItemClick
|
|
36
124
|
} = props,
|
|
37
125
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
126
|
+
const isVertical = direction === 'vertical';
|
|
127
|
+
const isReverse = isVertical;
|
|
38
128
|
const axisItem = useAxis({
|
|
39
129
|
axisDirection,
|
|
40
130
|
axisId
|
|
@@ -47,42 +137,83 @@ function PiecewiseColorLegend(props) {
|
|
|
47
137
|
location: 'legend'
|
|
48
138
|
}) ?? v.toLocaleString();
|
|
49
139
|
const formattedLabels = colorMap.thresholds.map(valueFormatter);
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
max: colorMap.thresholds[index],
|
|
67
|
-
formattedMax: formattedLabels[index]
|
|
68
|
-
});
|
|
69
|
-
const label = labelFormatter(data);
|
|
70
|
-
if (label === null) {
|
|
71
|
-
return null;
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
id: label,
|
|
140
|
+
const startClass = isReverse ? classes?.maxLabel : classes?.minLabel;
|
|
141
|
+
const endClass = isReverse ? classes?.minLabel : classes?.maxLabel;
|
|
142
|
+
const colors = colorMap.colors.map((color, colorIndex) => ({
|
|
143
|
+
color,
|
|
144
|
+
colorIndex
|
|
145
|
+
}));
|
|
146
|
+
const orderedColors = isReverse ? colors.reverse() : colors;
|
|
147
|
+
const isStart = labelPosition === 'start';
|
|
148
|
+
const isEnd = labelPosition === 'end';
|
|
149
|
+
const isExtremes = labelPosition === 'extremes';
|
|
150
|
+
return /*#__PURE__*/_jsx(RootElement, _extends({
|
|
151
|
+
className: clsx(classes?.root, className),
|
|
152
|
+
ref: ref
|
|
153
|
+
}, other, {
|
|
154
|
+
ownerState: props,
|
|
155
|
+
children: orderedColors.map(({
|
|
75
156
|
color,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
157
|
+
colorIndex
|
|
158
|
+
}, index) => {
|
|
159
|
+
const isFirst = index === 0;
|
|
160
|
+
const isLast = index === colorMap.colors.length - 1;
|
|
161
|
+
const isFirstColor = colorIndex === 0;
|
|
162
|
+
const isLastColor = colorIndex === colorMap.colors.length - 1;
|
|
163
|
+
const data = _extends({
|
|
164
|
+
index: colorIndex,
|
|
165
|
+
length: formattedLabels.length
|
|
166
|
+
}, isFirstColor ? {
|
|
167
|
+
min: null,
|
|
168
|
+
formattedMin: null
|
|
169
|
+
} : {
|
|
170
|
+
min: colorMap.thresholds[colorIndex - 1],
|
|
171
|
+
formattedMin: formattedLabels[colorIndex - 1]
|
|
172
|
+
}, isLastColor ? {
|
|
173
|
+
max: null,
|
|
174
|
+
formattedMax: null
|
|
175
|
+
} : {
|
|
176
|
+
max: colorMap.thresholds[colorIndex],
|
|
177
|
+
formattedMax: formattedLabels[colorIndex]
|
|
178
|
+
});
|
|
179
|
+
const label = labelFormatter?.(data);
|
|
180
|
+
if (label === null || label === undefined) {
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
const isTextBefore = isStart || isExtremes && isFirst;
|
|
184
|
+
const isTextAfter = isEnd || isExtremes && isLast;
|
|
185
|
+
const clickObject = {
|
|
186
|
+
type: 'piecewiseColor',
|
|
187
|
+
color,
|
|
188
|
+
label,
|
|
189
|
+
minValue: data.min,
|
|
190
|
+
maxValue: data.max
|
|
191
|
+
};
|
|
192
|
+
const Element = onItemClick ? 'button' : 'div';
|
|
193
|
+
return /*#__PURE__*/_jsx("li", {
|
|
194
|
+
children: /*#__PURE__*/_jsxs(Element, {
|
|
195
|
+
role: onItemClick ? 'button' : undefined,
|
|
196
|
+
type: onItemClick ? 'button' : undefined,
|
|
197
|
+
onClick:
|
|
198
|
+
// @ts-ignore onClick is only attached to a button
|
|
199
|
+
onItemClick ? event => onItemClick(event, clickObject, index) : undefined,
|
|
200
|
+
className: clsx(classes?.item, index === 0 && `${startClass}`, index === orderedColors.length - 1 && `${endClass}`),
|
|
201
|
+
children: [isTextBefore && /*#__PURE__*/_jsx(ChartsLabel, {
|
|
202
|
+
className: classes?.label,
|
|
203
|
+
children: label
|
|
204
|
+
}), /*#__PURE__*/_jsx(ChartsLabelMark, {
|
|
205
|
+
className: classes?.mark,
|
|
206
|
+
type: markType,
|
|
207
|
+
color: color
|
|
208
|
+
}), isTextAfter && /*#__PURE__*/_jsx(ChartsLabel, {
|
|
209
|
+
className: classes?.label,
|
|
210
|
+
children: label
|
|
211
|
+
})]
|
|
212
|
+
})
|
|
213
|
+
}, colorIndex);
|
|
214
|
+
})
|
|
84
215
|
}));
|
|
85
|
-
}
|
|
216
|
+
});
|
|
86
217
|
process.env.NODE_ENV !== "production" ? PiecewiseColorLegend.propTypes = {
|
|
87
218
|
// ----------------------------- Warning --------------------------------
|
|
88
219
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
@@ -102,76 +233,35 @@ process.env.NODE_ENV !== "production" ? PiecewiseColorLegend.propTypes = {
|
|
|
102
233
|
* Override or extend the styles applied to the component.
|
|
103
234
|
*/
|
|
104
235
|
classes: PropTypes.object,
|
|
236
|
+
className: PropTypes.string,
|
|
105
237
|
/**
|
|
106
238
|
* The direction of the legend layout.
|
|
107
|
-
*
|
|
108
|
-
*/
|
|
109
|
-
direction: PropTypes.oneOf(['column', 'row']).isRequired,
|
|
110
|
-
/**
|
|
111
|
-
* Hide the first item of the legend, corresponding to the [-infinity, min] piece.
|
|
112
|
-
* @default false
|
|
239
|
+
* @default 'horizontal'
|
|
113
240
|
*/
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* Hide the last item of the legend, corresponding to the [max, +infinity] piece.
|
|
117
|
-
* @default false
|
|
118
|
-
*/
|
|
119
|
-
hideLast: PropTypes.bool,
|
|
120
|
-
/**
|
|
121
|
-
* Space between two legend items (in px).
|
|
122
|
-
* @default 10
|
|
123
|
-
*/
|
|
124
|
-
itemGap: PropTypes.number,
|
|
125
|
-
/**
|
|
126
|
-
* Height of the item mark (in px).
|
|
127
|
-
* @default 20
|
|
128
|
-
*/
|
|
129
|
-
itemMarkHeight: PropTypes.number,
|
|
130
|
-
/**
|
|
131
|
-
* Width of the item mark (in px).
|
|
132
|
-
* @default 20
|
|
133
|
-
*/
|
|
134
|
-
itemMarkWidth: PropTypes.number,
|
|
241
|
+
direction: PropTypes.oneOf(['horizontal', 'vertical']),
|
|
135
242
|
/**
|
|
136
243
|
* Format the legend labels.
|
|
137
244
|
* @param {PiecewiseLabelFormatterParams} params The bound of the piece to format.
|
|
138
|
-
* @returns {string|null} The displayed label, or `null` to skip
|
|
245
|
+
* @returns {string|null} The displayed label, `''` to skip the label but show the color mark, or `null` to skip it entirely.
|
|
139
246
|
*/
|
|
140
247
|
labelFormatter: PropTypes.func,
|
|
141
248
|
/**
|
|
142
|
-
*
|
|
143
|
-
* @default
|
|
249
|
+
* Where to position the labels relative to the gradient.
|
|
250
|
+
* @default 'extremes'
|
|
144
251
|
*/
|
|
145
|
-
|
|
252
|
+
labelPosition: PropTypes.oneOf(['start', 'end', 'extremes']),
|
|
146
253
|
/**
|
|
147
|
-
*
|
|
148
|
-
* @default
|
|
254
|
+
* The type of the mark.
|
|
255
|
+
* @default 'square'
|
|
149
256
|
*/
|
|
150
|
-
|
|
257
|
+
markType: PropTypes.oneOf(['square', 'circle', 'line']),
|
|
151
258
|
/**
|
|
152
259
|
* Callback fired when a legend item is clicked.
|
|
153
|
-
* @param {React.MouseEvent<
|
|
260
|
+
* @param {React.MouseEvent<HTMLButtonElement, MouseEvent>} event The click event.
|
|
154
261
|
* @param {PiecewiseColorLegendItemContext} legendItem The legend item data.
|
|
155
262
|
* @param {number} index The index of the clicked legend item.
|
|
156
263
|
*/
|
|
157
264
|
onItemClick: PropTypes.func,
|
|
158
|
-
|
|
159
|
-
* Legend padding (in px).
|
|
160
|
-
* Can either be a single number, or an object with top, left, bottom, right properties.
|
|
161
|
-
* @default 10
|
|
162
|
-
*/
|
|
163
|
-
padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
164
|
-
bottom: PropTypes.number,
|
|
165
|
-
left: PropTypes.number,
|
|
166
|
-
right: PropTypes.number,
|
|
167
|
-
top: PropTypes.number
|
|
168
|
-
})]),
|
|
169
|
-
/**
|
|
170
|
-
* The position of the legend.
|
|
171
|
-
*/
|
|
172
|
-
position: PropTypes.shape({
|
|
173
|
-
horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
|
|
174
|
-
vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
|
|
175
|
-
}).isRequired
|
|
265
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
176
266
|
} : void 0;
|
|
177
267
|
export { PiecewiseColorLegend };
|
|
@@ -1,69 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import type { ChartsLegendProps } from './ChartsLegend';
|
|
2
|
+
import { ContinuousColorLegendProps } from './ContinuousColorLegend';
|
|
3
|
+
import { ChartsLegendPosition } from './legend.types';
|
|
4
|
+
import { PiecewiseColorLegendProps } from './PiecewiseColorLegend';
|
|
5
|
+
export interface ChartsLegendSlots {
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* Custom rendering of the legend.
|
|
8
|
+
* @default ChartsLegend
|
|
7
9
|
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The label displayed in the legend
|
|
11
|
-
*/
|
|
12
|
-
label: string;
|
|
10
|
+
legend?: React.JSXElementConstructor<ChartsLegendProps> | React.JSXElementConstructor<ContinuousColorLegendProps> | React.JSXElementConstructor<PiecewiseColorLegendProps>;
|
|
13
11
|
}
|
|
14
|
-
export interface
|
|
15
|
-
|
|
16
|
-
* The identifier of the legend element.
|
|
17
|
-
* Used for internal purpose such as `key` props
|
|
18
|
-
*/
|
|
19
|
-
id: number | string;
|
|
20
|
-
}
|
|
21
|
-
export interface SeriesLegendItemContext extends LegendItemContextBase {
|
|
22
|
-
/**
|
|
23
|
-
* The type of the legend item
|
|
24
|
-
* - `series` is used for series legend item
|
|
25
|
-
* - `piecewiseColor` is used for piecewise color legend item
|
|
26
|
-
*/
|
|
27
|
-
type: 'series';
|
|
28
|
-
/**
|
|
29
|
-
* The identifier of the series
|
|
30
|
-
*/
|
|
31
|
-
seriesId: SeriesId;
|
|
32
|
-
/**
|
|
33
|
-
* The identifier of the pie item
|
|
34
|
-
*/
|
|
35
|
-
itemId?: PieItemId;
|
|
12
|
+
export interface ChartsLegendSlotProps {
|
|
13
|
+
legend?: Partial<ChartsLegendProps | ContinuousColorLegendProps | PiecewiseColorLegendProps> & ChartsLegendPosition;
|
|
36
14
|
}
|
|
37
|
-
export interface
|
|
15
|
+
export interface ChartsLegendSlotExtension {
|
|
38
16
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* - `piecewiseColor` is used for piecewise color legend item
|
|
17
|
+
* Overridable component slots.
|
|
18
|
+
* @default {}
|
|
42
19
|
*/
|
|
43
|
-
|
|
20
|
+
slots?: ChartsLegendSlots;
|
|
44
21
|
/**
|
|
45
|
-
* The
|
|
22
|
+
* The props used for each component slot.
|
|
23
|
+
* @default {}
|
|
46
24
|
*/
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* The maximum value of the category
|
|
50
|
-
*/
|
|
51
|
-
maxValue: number | Date | null;
|
|
52
|
-
}
|
|
53
|
-
export type LegendItemContext = SeriesLegendItemContext | PiecewiseColorLegendItemContext;
|
|
54
|
-
export interface LegendItemWithPosition extends LegendItemParams {
|
|
55
|
-
positionX: number;
|
|
56
|
-
positionY: number;
|
|
57
|
-
innerHeight: number;
|
|
58
|
-
innerWidth: number;
|
|
59
|
-
outerHeight: number;
|
|
60
|
-
outerWidth: number;
|
|
61
|
-
rowIndex: number;
|
|
25
|
+
slotProps?: ChartsLegendSlotProps;
|
|
62
26
|
}
|
|
63
|
-
export type GetItemSpaceType = (label: string, inStyle?: ChartsTextStyle) => {
|
|
64
|
-
innerWidth: number;
|
|
65
|
-
innerHeight: number;
|
|
66
|
-
outerWidth: number;
|
|
67
|
-
outerHeight: number;
|
|
68
|
-
};
|
|
69
|
-
export {};
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
+
import type { ChartsLegendProps } from './ChartsLegend';
|
|
2
|
+
import type { ChartsLegendSlotExtension } from './chartsLegend.types';
|
|
1
3
|
export interface ChartsLegendClasses {
|
|
2
4
|
/** Styles applied to the root element. */
|
|
3
5
|
root: string;
|
|
4
6
|
/** Styles applied to a series element. */
|
|
5
7
|
series: string;
|
|
6
|
-
/** Styles applied to the item background. */
|
|
7
|
-
itemBackground: string;
|
|
8
8
|
/** Styles applied to series mark element. */
|
|
9
9
|
mark: string;
|
|
10
10
|
/** Styles applied to the series label. */
|
|
11
11
|
label: string;
|
|
12
|
-
/** Styles applied to the legend
|
|
13
|
-
|
|
14
|
-
/** Styles applied to the legend
|
|
15
|
-
|
|
12
|
+
/** Styles applied to the legend in column layout. */
|
|
13
|
+
vertical: string;
|
|
14
|
+
/** Styles applied to the legend in row layout. */
|
|
15
|
+
horizontal: string;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
18
|
-
export declare function getLegendUtilityClass(slot: string): string;
|
|
17
|
+
export declare const useUtilityClasses: (props: ChartsLegendProps & ChartsLegendSlotExtension) => Record<"root" | "label" | "mark" | "series", string>;
|
|
19
18
|
export declare const legendClasses: ChartsLegendClasses;
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
2
|
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
-
|
|
3
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
+
function getLegendUtilityClass(slot) {
|
|
4
5
|
return generateUtilityClass('MuiChartsLegend', slot);
|
|
5
6
|
}
|
|
6
|
-
export const
|
|
7
|
+
export const useUtilityClasses = props => {
|
|
8
|
+
const {
|
|
9
|
+
classes,
|
|
10
|
+
direction
|
|
11
|
+
} = props;
|
|
12
|
+
const slots = {
|
|
13
|
+
root: ['root', direction],
|
|
14
|
+
mark: ['mark'],
|
|
15
|
+
label: ['label'],
|
|
16
|
+
series: ['series']
|
|
17
|
+
};
|
|
18
|
+
return composeClasses(slots, getLegendUtilityClass, classes);
|
|
19
|
+
};
|
|
20
|
+
export const legendClasses = generateUtilityClasses('MuiChartsLegend', ['root', 'series', 'mark', 'label', 'vertical', 'horizontal']);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AxisId } from '../models/axis';
|
|
2
|
+
export interface ColorLegendSelector {
|
|
3
|
+
/**
|
|
4
|
+
* The axis direction containing the color configuration to represent.
|
|
5
|
+
* @default 'z'
|
|
6
|
+
*/
|
|
7
|
+
axisDirection?: 'x' | 'y' | 'z';
|
|
8
|
+
/**
|
|
9
|
+
* The id of the axis item with the color configuration to represent.
|
|
10
|
+
* @default The first axis item.
|
|
11
|
+
*/
|
|
12
|
+
axisId?: AxisId;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ContinuousColorLegendProps } from './ContinuousColorLegend';
|
|
2
|
+
import type { ChartsLegendSlotExtension } from './chartsLegend.types';
|
|
3
|
+
export interface ContinuousColorLegendClasses {
|
|
4
|
+
/** Styles applied to the root element. */
|
|
5
|
+
root: string;
|
|
6
|
+
/** Styles applied to the list item that renders the `minLabel`. */
|
|
7
|
+
minLabel: string;
|
|
8
|
+
/** Styles applied to the list item that renders the `maxLabel`. */
|
|
9
|
+
maxLabel: string;
|
|
10
|
+
/** Styles applied to the list item with the gradient. */
|
|
11
|
+
gradient: string;
|
|
12
|
+
/** Styles applied to the legend in column layout. */
|
|
13
|
+
vertical: string;
|
|
14
|
+
/** Styles applied to the legend in row layout. */
|
|
15
|
+
horizontal: string;
|
|
16
|
+
/** Styles applied to the legend with the labels before the gradient. */
|
|
17
|
+
start: string;
|
|
18
|
+
/** Styles applied to the legend with the labels after the gradient. */
|
|
19
|
+
end: string;
|
|
20
|
+
/** Styles applied to the legend with the labels on the extremes of the gradient. */
|
|
21
|
+
extremes: string;
|
|
22
|
+
/** Styles applied to the series label. */
|
|
23
|
+
label: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const useUtilityClasses: (props: ContinuousColorLegendProps & ChartsLegendSlotExtension) => Record<"root" | "label" | "mark" | "minLabel" | "maxLabel" | "gradient", string>;
|
|
26
|
+
export declare const continuousColorLegendClasses: ContinuousColorLegendClasses;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
2
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
3
|
+
import composeClasses from '@mui/utils/composeClasses';
|
|
4
|
+
function getLegendUtilityClass(slot) {
|
|
5
|
+
return generateUtilityClass('MuiContinuousColorLegend', slot);
|
|
6
|
+
}
|
|
7
|
+
export const useUtilityClasses = props => {
|
|
8
|
+
const {
|
|
9
|
+
classes,
|
|
10
|
+
direction,
|
|
11
|
+
labelPosition
|
|
12
|
+
} = props;
|
|
13
|
+
const slots = {
|
|
14
|
+
root: ['root', direction, labelPosition],
|
|
15
|
+
minLabel: ['minLabel'],
|
|
16
|
+
maxLabel: ['maxLabel'],
|
|
17
|
+
gradient: ['gradient'],
|
|
18
|
+
mark: ['mark'],
|
|
19
|
+
label: ['label']
|
|
20
|
+
};
|
|
21
|
+
return composeClasses(slots, getLegendUtilityClass, classes);
|
|
22
|
+
};
|
|
23
|
+
export const continuousColorLegendClasses = generateUtilityClasses('MuiContinuousColorLegend', ['root', 'minLabel', 'maxLabel', 'gradient', 'vertical', 'horizontal', 'start', 'end', 'extremes', 'label']);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Direction = 'vertical' | 'horizontal';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/ChartsLegend/index.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
export * from './ChartsLegend';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './chartsLegend.types';
|
|
3
|
+
export * from './direction';
|
|
4
|
+
export * from './legendContext.types';
|
|
5
|
+
export { legendClasses } from './chartsLegendClasses';
|
|
6
|
+
export type { ChartsLegendClasses } from './chartsLegendClasses';
|
|
3
7
|
export * from './ContinuousColorLegend';
|
|
8
|
+
export * from './colorLegend.types';
|
|
9
|
+
export { continuousColorLegendClasses } from './continuousColorLegendClasses';
|
|
10
|
+
export type { ContinuousColorLegendClasses } from './continuousColorLegendClasses';
|
|
4
11
|
export * from './PiecewiseColorLegend';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
12
|
+
export { piecewiseColorLegendClasses } from './piecewiseColorLegendClasses';
|
|
13
|
+
export type { PiecewiseColorLegendClasses } from './piecewiseColorLegendClasses';
|
|
14
|
+
export { piecewiseColorDefaultLabelFormatter } from './piecewiseColorDefaultLabelFormatter';
|
|
15
|
+
export type { PiecewiseLabelFormatterParams } from './piecewiseColorLegend.types';
|
|
16
|
+
export * from './legend.types';
|
package/ChartsLegend/index.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
export * from "./ChartsLegend.js";
|
|
2
|
-
export * from "./
|
|
2
|
+
export * from "./chartsLegend.types.js";
|
|
3
|
+
export * from "./direction.js";
|
|
4
|
+
export * from "./legendContext.types.js";
|
|
5
|
+
export { legendClasses } from "./chartsLegendClasses.js";
|
|
3
6
|
export * from "./ContinuousColorLegend.js";
|
|
7
|
+
export * from "./colorLegend.types.js";
|
|
8
|
+
export { continuousColorLegendClasses } from "./continuousColorLegendClasses.js";
|
|
4
9
|
export * from "./PiecewiseColorLegend.js";
|
|
5
|
-
export
|
|
6
|
-
export
|
|
10
|
+
export { piecewiseColorLegendClasses } from "./piecewiseColorLegendClasses.js";
|
|
11
|
+
export { piecewiseColorDefaultLabelFormatter } from "./piecewiseColorDefaultLabelFormatter.js";
|
|
12
|
+
export * from "./legend.types.js";
|