@mui/x-charts-pro 8.0.0-beta.2 → 8.0.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/BarChartPro/BarChartPro.js +788 -9
- package/CHANGELOG.md +423 -96
- package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
- package/ChartDataProviderPro/ChartDataProviderPro.js +27 -22
- package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -2
- package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
- package/FunnelChart/FunnelChart.js +73 -4
- package/FunnelChart/categoryAxis.types.d.ts +3 -2
- package/FunnelChart/funnelSectionClasses.d.ts +5 -0
- package/FunnelChart/funnelSectionClasses.js +1 -1
- package/FunnelChart/index.d.ts +1 -0
- package/FunnelChart/index.js +12 -0
- package/FunnelChart/useFunnelChartProps.js +3 -3
- package/Heatmap/Heatmap.d.ts +1 -1
- package/Heatmap/Heatmap.js +4 -3
- package/Heatmap/{HeatmapTooltip.js → HeatmapTooltip/HeatmapTooltip.js} +30 -34
- package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
- package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +26 -0
- package/Heatmap/HeatmapTooltip/index.d.ts +1 -0
- package/Heatmap/HeatmapTooltip/index.js +16 -0
- package/Heatmap/heatmapClasses.d.ts +5 -0
- package/Heatmap/heatmapClasses.js +1 -1
- package/Heatmap/index.d.ts +1 -1
- package/LineChartPro/LineChartPro.js +788 -9
- package/ScatterChartPro/ScatterChartPro.js +788 -9
- package/esm/BarChartPro/BarChartPro.js +788 -9
- package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
- package/esm/ChartDataProviderPro/ChartDataProviderPro.js +28 -23
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -2
- package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
- package/esm/FunnelChart/FunnelChart.js +73 -4
- package/esm/FunnelChart/categoryAxis.types.d.ts +3 -2
- package/esm/FunnelChart/funnelSectionClasses.d.ts +5 -0
- package/esm/FunnelChart/funnelSectionClasses.js +1 -1
- package/esm/FunnelChart/index.d.ts +1 -0
- package/esm/FunnelChart/index.js +1 -0
- package/esm/FunnelChart/useFunnelChartProps.js +3 -3
- package/esm/Heatmap/Heatmap.d.ts +1 -1
- package/esm/Heatmap/Heatmap.js +4 -3
- package/{modern/Heatmap → esm/Heatmap/HeatmapTooltip}/HeatmapTooltip.js +30 -34
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
- package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +22 -0
- package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -0
- package/esm/Heatmap/HeatmapTooltip/index.js +1 -0
- package/esm/Heatmap/heatmapClasses.d.ts +5 -0
- package/esm/Heatmap/heatmapClasses.js +1 -1
- package/esm/Heatmap/index.d.ts +1 -1
- package/esm/Heatmap/index.js +1 -1
- package/esm/LineChartPro/LineChartPro.js +788 -9
- package/esm/ScatterChartPro/ScatterChartPro.js +788 -9
- package/esm/index.js +1 -1
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +28 -35
- package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
- package/index.js +1 -1
- package/internals/plugins/useChartProZoom/useChartProZoom.js +28 -34
- package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
- package/package.json +9 -19
- package/esm/Heatmap/HeatmapTooltip.js +0 -288
- package/esm/internals/utils/releaseInfo.d.ts +0 -1
- package/esm/internals/utils/releaseInfo.js +0 -13
- package/internals/utils/releaseInfo.d.ts +0 -1
- package/internals/utils/releaseInfo.js +0 -21
- package/modern/BarChartPro/BarChartPro.d.ts +0 -18
- package/modern/BarChartPro/BarChartPro.js +0 -404
- package/modern/BarChartPro/BarChartPro.plugins.d.ts +0 -4
- package/modern/BarChartPro/BarChartPro.plugins.js +0 -3
- package/modern/BarChartPro/index.d.ts +0 -1
- package/modern/BarChartPro/index.js +0 -1
- package/modern/ChartContainerPro/ChartContainerPro.d.ts +0 -35
- package/modern/ChartContainerPro/ChartContainerPro.js +0 -290
- package/modern/ChartContainerPro/index.d.ts +0 -2
- package/modern/ChartContainerPro/index.js +0 -2
- package/modern/ChartContainerPro/useChartContainerProProps.d.ts +0 -9
- package/modern/ChartContainerPro/useChartContainerProProps.js +0 -35
- package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -37
- package/modern/ChartDataProviderPro/ChartDataProviderPro.js +0 -106
- package/modern/ChartDataProviderPro/index.d.ts +0 -2
- package/modern/ChartDataProviderPro/index.js +0 -2
- package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -8
- package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -15
- package/modern/FunnelChart/FunnelChart.d.ts +0 -37
- package/modern/FunnelChart/FunnelChart.js +0 -212
- package/modern/FunnelChart/FunnelPlot.d.ts +0 -16
- package/modern/FunnelChart/FunnelPlot.js +0 -184
- package/modern/FunnelChart/FunnelSection.d.ts +0 -15
- package/modern/FunnelChart/FunnelSection.js +0 -56
- package/modern/FunnelChart/categoryAxis.types.d.ts +0 -24
- package/modern/FunnelChart/categoryAxis.types.js +0 -1
- package/modern/FunnelChart/funnel.types.d.ts +0 -124
- package/modern/FunnelChart/funnel.types.js +0 -1
- package/modern/FunnelChart/funnelPlotSlots.types.d.ts +0 -20
- package/modern/FunnelChart/funnelPlotSlots.types.js +0 -1
- package/modern/FunnelChart/funnelSectionClasses.d.ts +0 -13
- package/modern/FunnelChart/funnelSectionClasses.js +0 -20
- package/modern/FunnelChart/funnelSlots.types.d.ts +0 -19
- package/modern/FunnelChart/funnelSlots.types.js +0 -1
- package/modern/FunnelChart/funnelStepCurve.d.ts +0 -4
- package/modern/FunnelChart/funnelStepCurve.js +0 -67
- package/modern/FunnelChart/index.d.ts +0 -7
- package/modern/FunnelChart/index.js +0 -5
- package/modern/FunnelChart/labelUtils.d.ts +0 -42
- package/modern/FunnelChart/labelUtils.js +0 -166
- package/modern/FunnelChart/seriesConfig/extremums.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/extremums.js +0 -42
- package/modern/FunnelChart/seriesConfig/getColor.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/getColor.js +0 -4
- package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +0 -11
- package/modern/FunnelChart/seriesConfig/index.d.ts +0 -2
- package/modern/FunnelChart/seriesConfig/index.js +0 -15
- package/modern/FunnelChart/seriesConfig/legend.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/legend.js +0 -25
- package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/seriesProcessor.js +0 -89
- package/modern/FunnelChart/seriesConfig/tooltip.d.ts +0 -3
- package/modern/FunnelChart/seriesConfig/tooltip.js +0 -29
- package/modern/FunnelChart/useFunnelChartProps.d.ts +0 -30
- package/modern/FunnelChart/useFunnelChartProps.js +0 -161
- package/modern/Heatmap/Heatmap.d.ts +0 -57
- package/modern/Heatmap/Heatmap.js +0 -387
- package/modern/Heatmap/Heatmap.plugins.d.ts +0 -3
- package/modern/Heatmap/Heatmap.plugins.js +0 -2
- package/modern/Heatmap/HeatmapItem.d.ts +0 -49
- package/modern/Heatmap/HeatmapItem.js +0 -106
- package/modern/Heatmap/HeatmapPlot.d.ts +0 -8
- package/modern/Heatmap/HeatmapPlot.js +0 -59
- package/modern/Heatmap/HeatmapTooltip.d.ts +0 -16
- package/modern/Heatmap/heatmapClasses.d.ts +0 -11
- package/modern/Heatmap/heatmapClasses.js +0 -14
- package/modern/Heatmap/index.d.ts +0 -4
- package/modern/Heatmap/index.js +0 -4
- package/modern/Heatmap/seriesConfig/extremums.d.ts +0 -2
- package/modern/Heatmap/seriesConfig/extremums.js +0 -8
- package/modern/Heatmap/seriesConfig/getColor.d.ts +0 -3
- package/modern/Heatmap/seriesConfig/getColor.js +0 -15
- package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
- package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +0 -8
- package/modern/Heatmap/seriesConfig/index.d.ts +0 -2
- package/modern/Heatmap/seriesConfig/index.js +0 -14
- package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +0 -3
- package/modern/Heatmap/seriesConfig/seriesProcessor.js +0 -21
- package/modern/Heatmap/seriesConfig/tooltip.d.ts +0 -3
- package/modern/Heatmap/seriesConfig/tooltip.js +0 -25
- package/modern/LineChartPro/LineChartPro.d.ts +0 -17
- package/modern/LineChartPro/LineChartPro.js +0 -401
- package/modern/LineChartPro/LineChartPro.plugins.d.ts +0 -4
- package/modern/LineChartPro/LineChartPro.plugins.js +0 -3
- package/modern/LineChartPro/index.d.ts +0 -1
- package/modern/LineChartPro/index.js +0 -1
- package/modern/ScatterChartPro/ScatterChartPro.d.ts +0 -17
- package/modern/ScatterChartPro/ScatterChartPro.js +0 -395
- package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +0 -4
- package/modern/ScatterChartPro/ScatterChartPro.plugins.js +0 -3
- package/modern/ScatterChartPro/index.d.ts +0 -1
- package/modern/ScatterChartPro/index.js +0 -1
- package/modern/hooks/index.d.ts +0 -2
- package/modern/hooks/index.js +0 -2
- package/modern/hooks/useFunnelSeries.d.ts +0 -33
- package/modern/hooks/useFunnelSeries.js +0 -42
- package/modern/hooks/useHeatmapSeries.d.ts +0 -33
- package/modern/hooks/useHeatmapSeries.js +0 -42
- package/modern/hooks/zoom/index.d.ts +0 -1
- package/modern/hooks/zoom/index.js +0 -1
- package/modern/hooks/zoom/useIsZoomInteracting.d.ts +0 -6
- package/modern/hooks/zoom/useIsZoomInteracting.js +0 -14
- package/modern/index.d.ts +0 -34
- package/modern/index.js +0 -45
- package/modern/internals/plugins/allPlugins.d.ts +0 -8
- package/modern/internals/plugins/allPlugins.js +0 -6
- package/modern/internals/plugins/useChartProZoom/index.d.ts +0 -3
- package/modern/internals/plugins/useChartProZoom/index.js +0 -3
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +0 -3
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +0 -350
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +0 -203
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -4
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +0 -53
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +0 -1
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +0 -45
- package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +0 -126
- package/modern/internals/utils/releaseInfo.d.ts +0 -1
- package/modern/internals/utils/releaseInfo.js +0 -13
- package/modern/models/index.d.ts +0 -2
- package/modern/models/index.js +0 -2
- package/modern/models/seriesType/heatmap.d.ts +0 -28
- package/modern/models/seriesType/heatmap.js +0 -1
- package/modern/models/seriesType/index.d.ts +0 -1
- package/modern/models/seriesType/index.js +0 -1
- package/modern/package.json +0 -1
- package/modern/themeAugmentation/components.d.ts +0 -23
- package/modern/themeAugmentation/index.d.ts +0 -4
- package/modern/themeAugmentation/index.js +0 -0
- package/modern/themeAugmentation/overrides.d.ts +0 -11
- package/modern/themeAugmentation/props.d.ts +0 -20
- package/modern/typeOverloads/index.d.ts +0 -1
- package/modern/typeOverloads/index.js +0 -1
- package/modern/typeOverloads/modules.d.ts +0 -33
- package/modern/typeOverloads/modules.js +0 -1
- package/tsconfig.build.tsbuildinfo +0 -1
- /package/Heatmap/{HeatmapTooltip.d.ts → HeatmapTooltip/HeatmapTooltip.d.ts} +0 -0
- /package/esm/Heatmap/{HeatmapTooltip.d.ts → HeatmapTooltip/HeatmapTooltip.d.ts} +0 -0
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["seriesId", "dataIndex", "color", "value", "slotProps", "slots"];
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import PropTypes from 'prop-types';
|
|
6
|
-
import { styled } from '@mui/material/styles';
|
|
7
|
-
import useSlotProps from '@mui/utils/useSlotProps';
|
|
8
|
-
import composeClasses from '@mui/utils/composeClasses';
|
|
9
|
-
import { useItemHighlighted } from '@mui/x-charts/hooks';
|
|
10
|
-
import { useInteractionItemProps } from '@mui/x-charts/internals';
|
|
11
|
-
import { getHeatmapUtilityClass } from "./heatmapClasses.js";
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
const HeatmapCell = styled('rect', {
|
|
14
|
-
name: 'MuiHeatmap',
|
|
15
|
-
slot: 'Cell',
|
|
16
|
-
overridesResolver: (_, styles) => styles.arc
|
|
17
|
-
})(({
|
|
18
|
-
ownerState
|
|
19
|
-
}) => ({
|
|
20
|
-
filter: ownerState.isHighlighted && 'saturate(120%)' || ownerState.isFaded && 'saturate(80%)' || undefined,
|
|
21
|
-
fill: ownerState.color,
|
|
22
|
-
shapeRendering: 'crispEdges'
|
|
23
|
-
}));
|
|
24
|
-
const useUtilityClasses = ownerState => {
|
|
25
|
-
const {
|
|
26
|
-
classes,
|
|
27
|
-
seriesId,
|
|
28
|
-
isFaded,
|
|
29
|
-
isHighlighted
|
|
30
|
-
} = ownerState;
|
|
31
|
-
const slots = {
|
|
32
|
-
cell: ['cell', `series-${seriesId}`, isFaded && 'faded', isHighlighted && 'highlighted']
|
|
33
|
-
};
|
|
34
|
-
return composeClasses(slots, getHeatmapUtilityClass, classes);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @ignore - internal component.
|
|
39
|
-
*/
|
|
40
|
-
function HeatmapItem(props) {
|
|
41
|
-
const {
|
|
42
|
-
seriesId,
|
|
43
|
-
dataIndex,
|
|
44
|
-
color,
|
|
45
|
-
value,
|
|
46
|
-
slotProps = {},
|
|
47
|
-
slots = {}
|
|
48
|
-
} = props,
|
|
49
|
-
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
50
|
-
const interactionProps = useInteractionItemProps({
|
|
51
|
-
type: 'heatmap',
|
|
52
|
-
seriesId,
|
|
53
|
-
dataIndex
|
|
54
|
-
});
|
|
55
|
-
const {
|
|
56
|
-
isFaded,
|
|
57
|
-
isHighlighted
|
|
58
|
-
} = useItemHighlighted({
|
|
59
|
-
seriesId,
|
|
60
|
-
dataIndex
|
|
61
|
-
});
|
|
62
|
-
const ownerState = {
|
|
63
|
-
seriesId,
|
|
64
|
-
dataIndex,
|
|
65
|
-
color,
|
|
66
|
-
value,
|
|
67
|
-
isFaded,
|
|
68
|
-
isHighlighted
|
|
69
|
-
};
|
|
70
|
-
const classes = useUtilityClasses(ownerState);
|
|
71
|
-
const Cell = slots?.cell ?? HeatmapCell;
|
|
72
|
-
const cellProps = useSlotProps({
|
|
73
|
-
elementType: Cell,
|
|
74
|
-
additionalProps: interactionProps,
|
|
75
|
-
externalForwardedProps: _extends({}, other),
|
|
76
|
-
externalSlotProps: slotProps.cell,
|
|
77
|
-
ownerState,
|
|
78
|
-
className: classes.cell
|
|
79
|
-
});
|
|
80
|
-
return /*#__PURE__*/_jsx(Cell, _extends({}, cellProps));
|
|
81
|
-
}
|
|
82
|
-
process.env.NODE_ENV !== "production" ? HeatmapItem.propTypes = {
|
|
83
|
-
// ----------------------------- Warning --------------------------------
|
|
84
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
85
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
86
|
-
// ----------------------------------------------------------------------
|
|
87
|
-
color: PropTypes.string.isRequired,
|
|
88
|
-
dataIndex: PropTypes.number.isRequired,
|
|
89
|
-
height: PropTypes.number.isRequired,
|
|
90
|
-
seriesId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
|
91
|
-
/**
|
|
92
|
-
* The props used for each component slot.
|
|
93
|
-
* @default {}
|
|
94
|
-
*/
|
|
95
|
-
slotProps: PropTypes.object,
|
|
96
|
-
/**
|
|
97
|
-
* Overridable component slots.
|
|
98
|
-
* @default {}
|
|
99
|
-
*/
|
|
100
|
-
slots: PropTypes.object,
|
|
101
|
-
value: PropTypes.number.isRequired,
|
|
102
|
-
width: PropTypes.number.isRequired,
|
|
103
|
-
x: PropTypes.number.isRequired,
|
|
104
|
-
y: PropTypes.number.isRequired
|
|
105
|
-
} : void 0;
|
|
106
|
-
export { HeatmapItem };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { HeatmapItemProps } from "./HeatmapItem.js";
|
|
3
|
-
export interface HeatmapPlotProps extends Pick<HeatmapItemProps, 'slots' | 'slotProps'> {}
|
|
4
|
-
declare function HeatmapPlot(props: HeatmapPlotProps): React.JSX.Element | null;
|
|
5
|
-
declare namespace HeatmapPlot {
|
|
6
|
-
var propTypes: any;
|
|
7
|
-
}
|
|
8
|
-
export { HeatmapPlot };
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
|
-
import { useXScale, useYScale, useZColorScale } from '@mui/x-charts/hooks';
|
|
6
|
-
import { useHeatmapSeriesContext } from "../hooks/useHeatmapSeries.js";
|
|
7
|
-
import { HeatmapItem } from "./HeatmapItem.js";
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
function HeatmapPlot(props) {
|
|
10
|
-
const xScale = useXScale();
|
|
11
|
-
const yScale = useYScale();
|
|
12
|
-
const colorScale = useZColorScale();
|
|
13
|
-
const series = useHeatmapSeriesContext();
|
|
14
|
-
const xDomain = xScale.domain();
|
|
15
|
-
const yDomain = yScale.domain();
|
|
16
|
-
if (!series || series.seriesOrder.length === 0) {
|
|
17
|
-
return null;
|
|
18
|
-
}
|
|
19
|
-
const seriesToDisplay = series.series[series.seriesOrder[0]];
|
|
20
|
-
return /*#__PURE__*/_jsx("g", {
|
|
21
|
-
children: seriesToDisplay.data.map(([xIndex, yIndex, value], dataIndex) => {
|
|
22
|
-
const x = xScale(xDomain[xIndex]);
|
|
23
|
-
const y = yScale(yDomain[yIndex]);
|
|
24
|
-
const color = colorScale?.(value);
|
|
25
|
-
if (x === undefined || y === undefined || !color) {
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
return /*#__PURE__*/_jsx(HeatmapItem, {
|
|
29
|
-
width: xScale.bandwidth(),
|
|
30
|
-
height: yScale.bandwidth(),
|
|
31
|
-
x: x,
|
|
32
|
-
y: y,
|
|
33
|
-
color: color,
|
|
34
|
-
dataIndex: dataIndex,
|
|
35
|
-
seriesId: series.seriesOrder[0],
|
|
36
|
-
value: value,
|
|
37
|
-
slots: props.slots,
|
|
38
|
-
slotProps: props.slotProps
|
|
39
|
-
}, `${xIndex}_${yIndex}`);
|
|
40
|
-
})
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
process.env.NODE_ENV !== "production" ? HeatmapPlot.propTypes = {
|
|
44
|
-
// ----------------------------- Warning --------------------------------
|
|
45
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
46
|
-
// | To update them edit the TypeScript types and run "pnpm proptypes" |
|
|
47
|
-
// ----------------------------------------------------------------------
|
|
48
|
-
/**
|
|
49
|
-
* The props used for each component slot.
|
|
50
|
-
* @default {}
|
|
51
|
-
*/
|
|
52
|
-
slotProps: PropTypes.object,
|
|
53
|
-
/**
|
|
54
|
-
* Overridable component slots.
|
|
55
|
-
* @default {}
|
|
56
|
-
*/
|
|
57
|
-
slots: PropTypes.object
|
|
58
|
-
} : void 0;
|
|
59
|
-
export { HeatmapPlot };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ChartsTooltipContainerProps } from '@mui/x-charts/ChartsTooltip';
|
|
3
|
-
export interface HeatmapTooltipProps extends Omit<ChartsTooltipContainerProps, 'trigger' | 'children'> {
|
|
4
|
-
/**
|
|
5
|
-
* Select the kind of tooltip to display
|
|
6
|
-
* - 'item': Shows data about the item below the mouse.
|
|
7
|
-
* - 'none': Does not display tooltip
|
|
8
|
-
* @default 'item'
|
|
9
|
-
*/
|
|
10
|
-
trigger?: 'item' | 'none';
|
|
11
|
-
}
|
|
12
|
-
declare function HeatmapTooltip(props: HeatmapTooltipProps): React.JSX.Element;
|
|
13
|
-
declare namespace HeatmapTooltip {
|
|
14
|
-
var propTypes: any;
|
|
15
|
-
}
|
|
16
|
-
export { HeatmapTooltip };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export interface HeatmapClasses {
|
|
2
|
-
/** Styles applied to the heatmap cells. */
|
|
3
|
-
cell: string;
|
|
4
|
-
/** Styles applied to the cell element if highlighted. */
|
|
5
|
-
highlighted: string;
|
|
6
|
-
/** Styles applied to the cell element if faded. */
|
|
7
|
-
faded: string;
|
|
8
|
-
}
|
|
9
|
-
export type HeatmapClassKey = keyof HeatmapClasses;
|
|
10
|
-
export declare function getHeatmapUtilityClass(slot: string): string;
|
|
11
|
-
export declare const heatmapClasses: HeatmapClasses;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import generateUtilityClass from '@mui/utils/generateUtilityClass';
|
|
3
|
-
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
4
|
-
export function getHeatmapUtilityClass(slot) {
|
|
5
|
-
// Those should be common to all charts
|
|
6
|
-
if (['highlighted', 'faded'].includes(slot)) {
|
|
7
|
-
return generateUtilityClass('Charts', slot);
|
|
8
|
-
}
|
|
9
|
-
return generateUtilityClass('MuiHeatmap', slot);
|
|
10
|
-
}
|
|
11
|
-
export const heatmapClasses = _extends({}, generateUtilityClasses('MuiHeatmap', ['cell']), {
|
|
12
|
-
highlighted: 'Charts-highlighted',
|
|
13
|
-
faded: 'Charts-faded'
|
|
14
|
-
});
|
package/modern/Heatmap/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const getColor = (series, xAxis, yAxis, zAxis) => {
|
|
2
|
-
const zColorScale = zAxis?.colorScale;
|
|
3
|
-
if (zColorScale) {
|
|
4
|
-
return dataIndex => {
|
|
5
|
-
const value = series.data[dataIndex];
|
|
6
|
-
const color = zColorScale(value[2]);
|
|
7
|
-
if (color === null) {
|
|
8
|
-
return '';
|
|
9
|
-
}
|
|
10
|
-
return color;
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
return () => '';
|
|
14
|
-
};
|
|
15
|
-
export default getColor;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
const getSeriesWithDefaultValues = (seriesData, seriesIndex, colors) => {
|
|
3
|
-
return _extends({
|
|
4
|
-
id: seriesData.id ?? `auto-generated-id-${seriesIndex}`,
|
|
5
|
-
color: colors[seriesIndex % colors.length]
|
|
6
|
-
}, seriesData);
|
|
7
|
-
};
|
|
8
|
-
export default getSeriesWithDefaultValues;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { getBaseExtremum } from "./extremums.js";
|
|
2
|
-
import seriesProcessor from "./seriesProcessor.js";
|
|
3
|
-
import getColor from "./getColor.js";
|
|
4
|
-
import tooltipGetter from "./tooltip.js";
|
|
5
|
-
import getSeriesWithDefaultValues from "./getSeriesWithDefaultValues.js";
|
|
6
|
-
export const seriesConfig = {
|
|
7
|
-
seriesProcessor,
|
|
8
|
-
colorProcessor: getColor,
|
|
9
|
-
legendGetter: () => [],
|
|
10
|
-
tooltipGetter,
|
|
11
|
-
xExtremumGetter: getBaseExtremum,
|
|
12
|
-
yExtremumGetter: getBaseExtremum,
|
|
13
|
-
getSeriesWithDefaultValues
|
|
14
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
const seriesProcessor = params => {
|
|
3
|
-
const {
|
|
4
|
-
series,
|
|
5
|
-
seriesOrder
|
|
6
|
-
} = params;
|
|
7
|
-
const defaultizedSeries = {};
|
|
8
|
-
Object.keys(series).forEach(seriesId => {
|
|
9
|
-
defaultizedSeries[seriesId] = _extends({
|
|
10
|
-
// Defaultize the data and the value formatter.
|
|
11
|
-
valueFormatter: v => v[2].toString(),
|
|
12
|
-
data: [],
|
|
13
|
-
labelMarkType: 'square'
|
|
14
|
-
}, series[seriesId]);
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
series: defaultizedSeries,
|
|
18
|
-
seriesOrder
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default seriesProcessor;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { getLabel } from '@mui/x-charts/internals';
|
|
2
|
-
const tooltipGetter = params => {
|
|
3
|
-
const {
|
|
4
|
-
series,
|
|
5
|
-
getColor,
|
|
6
|
-
identifier
|
|
7
|
-
} = params;
|
|
8
|
-
if (!identifier || identifier.dataIndex === undefined) {
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
|
-
const label = getLabel(series.label, 'tooltip');
|
|
12
|
-
const value = series.data[identifier.dataIndex];
|
|
13
|
-
const formattedValue = series.valueFormatter(value, {
|
|
14
|
-
dataIndex: identifier.dataIndex
|
|
15
|
-
});
|
|
16
|
-
return {
|
|
17
|
-
identifier,
|
|
18
|
-
color: getColor(identifier.dataIndex),
|
|
19
|
-
label,
|
|
20
|
-
value,
|
|
21
|
-
formattedValue,
|
|
22
|
-
markType: series.labelMarkType
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export default tooltipGetter;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { LineChartProps } from '@mui/x-charts/LineChart';
|
|
3
|
-
import { ChartContainerProProps } from "../ChartContainerPro/index.js";
|
|
4
|
-
import { LineChartProPluginsSignatures } from "./LineChartPro.plugins.js";
|
|
5
|
-
export interface LineChartProProps extends Omit<LineChartProps, 'apiRef'>, Omit<ChartContainerProProps<'line', LineChartProPluginsSignatures>, 'series' | 'plugins' | 'seriesConfig'> {}
|
|
6
|
-
/**
|
|
7
|
-
* Demos:
|
|
8
|
-
*
|
|
9
|
-
* - [Lines](https://mui.com/x/react-charts/lines/)
|
|
10
|
-
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
|
|
11
|
-
*
|
|
12
|
-
* API:
|
|
13
|
-
*
|
|
14
|
-
* - [LineChart API](https://mui.com/x/api/charts/line-chart/)
|
|
15
|
-
*/
|
|
16
|
-
declare const LineChartPro: React.ForwardRefExoticComponent<LineChartProProps & React.RefAttributes<SVGSVGElement>>;
|
|
17
|
-
export { LineChartPro };
|