@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.
Files changed (200) hide show
  1. package/BarChartPro/BarChartPro.js +788 -9
  2. package/CHANGELOG.md +423 -96
  3. package/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  4. package/ChartDataProviderPro/ChartDataProviderPro.js +27 -22
  5. package/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -2
  6. package/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
  7. package/FunnelChart/FunnelChart.js +73 -4
  8. package/FunnelChart/categoryAxis.types.d.ts +3 -2
  9. package/FunnelChart/funnelSectionClasses.d.ts +5 -0
  10. package/FunnelChart/funnelSectionClasses.js +1 -1
  11. package/FunnelChart/index.d.ts +1 -0
  12. package/FunnelChart/index.js +12 -0
  13. package/FunnelChart/useFunnelChartProps.js +3 -3
  14. package/Heatmap/Heatmap.d.ts +1 -1
  15. package/Heatmap/Heatmap.js +4 -3
  16. package/Heatmap/{HeatmapTooltip.js → HeatmapTooltip/HeatmapTooltip.js} +30 -34
  17. package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
  18. package/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +26 -0
  19. package/Heatmap/HeatmapTooltip/index.d.ts +1 -0
  20. package/Heatmap/HeatmapTooltip/index.js +16 -0
  21. package/Heatmap/heatmapClasses.d.ts +5 -0
  22. package/Heatmap/heatmapClasses.js +1 -1
  23. package/Heatmap/index.d.ts +1 -1
  24. package/LineChartPro/LineChartPro.js +788 -9
  25. package/ScatterChartPro/ScatterChartPro.js +788 -9
  26. package/esm/BarChartPro/BarChartPro.js +788 -9
  27. package/esm/ChartDataProviderPro/ChartDataProviderPro.d.ts +1 -1
  28. package/esm/ChartDataProviderPro/ChartDataProviderPro.js +28 -23
  29. package/esm/ChartDataProviderPro/useChartDataProviderProProps.d.ts +1 -2
  30. package/esm/ChartDataProviderPro/useChartDataProviderProProps.js +0 -2
  31. package/esm/FunnelChart/FunnelChart.js +73 -4
  32. package/esm/FunnelChart/categoryAxis.types.d.ts +3 -2
  33. package/esm/FunnelChart/funnelSectionClasses.d.ts +5 -0
  34. package/esm/FunnelChart/funnelSectionClasses.js +1 -1
  35. package/esm/FunnelChart/index.d.ts +1 -0
  36. package/esm/FunnelChart/index.js +1 -0
  37. package/esm/FunnelChart/useFunnelChartProps.js +3 -3
  38. package/esm/Heatmap/Heatmap.d.ts +1 -1
  39. package/esm/Heatmap/Heatmap.js +4 -3
  40. package/{modern/Heatmap → esm/Heatmap/HeatmapTooltip}/HeatmapTooltip.js +30 -34
  41. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.d.ts +4 -0
  42. package/esm/Heatmap/HeatmapTooltip/HeatmapTooltipAxesValue.js +22 -0
  43. package/esm/Heatmap/HeatmapTooltip/index.d.ts +1 -0
  44. package/esm/Heatmap/HeatmapTooltip/index.js +1 -0
  45. package/esm/Heatmap/heatmapClasses.d.ts +5 -0
  46. package/esm/Heatmap/heatmapClasses.js +1 -1
  47. package/esm/Heatmap/index.d.ts +1 -1
  48. package/esm/Heatmap/index.js +1 -1
  49. package/esm/LineChartPro/LineChartPro.js +788 -9
  50. package/esm/ScatterChartPro/ScatterChartPro.js +788 -9
  51. package/esm/index.js +1 -1
  52. package/esm/internals/plugins/useChartProZoom/useChartProZoom.js +28 -35
  53. package/esm/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
  54. package/index.js +1 -1
  55. package/internals/plugins/useChartProZoom/useChartProZoom.js +28 -34
  56. package/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +7 -7
  57. package/package.json +9 -19
  58. package/esm/Heatmap/HeatmapTooltip.js +0 -288
  59. package/esm/internals/utils/releaseInfo.d.ts +0 -1
  60. package/esm/internals/utils/releaseInfo.js +0 -13
  61. package/internals/utils/releaseInfo.d.ts +0 -1
  62. package/internals/utils/releaseInfo.js +0 -21
  63. package/modern/BarChartPro/BarChartPro.d.ts +0 -18
  64. package/modern/BarChartPro/BarChartPro.js +0 -404
  65. package/modern/BarChartPro/BarChartPro.plugins.d.ts +0 -4
  66. package/modern/BarChartPro/BarChartPro.plugins.js +0 -3
  67. package/modern/BarChartPro/index.d.ts +0 -1
  68. package/modern/BarChartPro/index.js +0 -1
  69. package/modern/ChartContainerPro/ChartContainerPro.d.ts +0 -35
  70. package/modern/ChartContainerPro/ChartContainerPro.js +0 -290
  71. package/modern/ChartContainerPro/index.d.ts +0 -2
  72. package/modern/ChartContainerPro/index.js +0 -2
  73. package/modern/ChartContainerPro/useChartContainerProProps.d.ts +0 -9
  74. package/modern/ChartContainerPro/useChartContainerProProps.js +0 -35
  75. package/modern/ChartDataProviderPro/ChartDataProviderPro.d.ts +0 -37
  76. package/modern/ChartDataProviderPro/ChartDataProviderPro.js +0 -106
  77. package/modern/ChartDataProviderPro/index.d.ts +0 -2
  78. package/modern/ChartDataProviderPro/index.js +0 -2
  79. package/modern/ChartDataProviderPro/useChartDataProviderProProps.d.ts +0 -8
  80. package/modern/ChartDataProviderPro/useChartDataProviderProProps.js +0 -15
  81. package/modern/FunnelChart/FunnelChart.d.ts +0 -37
  82. package/modern/FunnelChart/FunnelChart.js +0 -212
  83. package/modern/FunnelChart/FunnelPlot.d.ts +0 -16
  84. package/modern/FunnelChart/FunnelPlot.js +0 -184
  85. package/modern/FunnelChart/FunnelSection.d.ts +0 -15
  86. package/modern/FunnelChart/FunnelSection.js +0 -56
  87. package/modern/FunnelChart/categoryAxis.types.d.ts +0 -24
  88. package/modern/FunnelChart/categoryAxis.types.js +0 -1
  89. package/modern/FunnelChart/funnel.types.d.ts +0 -124
  90. package/modern/FunnelChart/funnel.types.js +0 -1
  91. package/modern/FunnelChart/funnelPlotSlots.types.d.ts +0 -20
  92. package/modern/FunnelChart/funnelPlotSlots.types.js +0 -1
  93. package/modern/FunnelChart/funnelSectionClasses.d.ts +0 -13
  94. package/modern/FunnelChart/funnelSectionClasses.js +0 -20
  95. package/modern/FunnelChart/funnelSlots.types.d.ts +0 -19
  96. package/modern/FunnelChart/funnelSlots.types.js +0 -1
  97. package/modern/FunnelChart/funnelStepCurve.d.ts +0 -4
  98. package/modern/FunnelChart/funnelStepCurve.js +0 -67
  99. package/modern/FunnelChart/index.d.ts +0 -7
  100. package/modern/FunnelChart/index.js +0 -5
  101. package/modern/FunnelChart/labelUtils.d.ts +0 -42
  102. package/modern/FunnelChart/labelUtils.js +0 -166
  103. package/modern/FunnelChart/seriesConfig/extremums.d.ts +0 -3
  104. package/modern/FunnelChart/seriesConfig/extremums.js +0 -42
  105. package/modern/FunnelChart/seriesConfig/getColor.d.ts +0 -3
  106. package/modern/FunnelChart/seriesConfig/getColor.js +0 -4
  107. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  108. package/modern/FunnelChart/seriesConfig/getSeriesWithDefaultValues.js +0 -11
  109. package/modern/FunnelChart/seriesConfig/index.d.ts +0 -2
  110. package/modern/FunnelChart/seriesConfig/index.js +0 -15
  111. package/modern/FunnelChart/seriesConfig/legend.d.ts +0 -3
  112. package/modern/FunnelChart/seriesConfig/legend.js +0 -25
  113. package/modern/FunnelChart/seriesConfig/seriesProcessor.d.ts +0 -3
  114. package/modern/FunnelChart/seriesConfig/seriesProcessor.js +0 -89
  115. package/modern/FunnelChart/seriesConfig/tooltip.d.ts +0 -3
  116. package/modern/FunnelChart/seriesConfig/tooltip.js +0 -29
  117. package/modern/FunnelChart/useFunnelChartProps.d.ts +0 -30
  118. package/modern/FunnelChart/useFunnelChartProps.js +0 -161
  119. package/modern/Heatmap/Heatmap.d.ts +0 -57
  120. package/modern/Heatmap/Heatmap.js +0 -387
  121. package/modern/Heatmap/Heatmap.plugins.d.ts +0 -3
  122. package/modern/Heatmap/Heatmap.plugins.js +0 -2
  123. package/modern/Heatmap/HeatmapItem.d.ts +0 -49
  124. package/modern/Heatmap/HeatmapItem.js +0 -106
  125. package/modern/Heatmap/HeatmapPlot.d.ts +0 -8
  126. package/modern/Heatmap/HeatmapPlot.js +0 -59
  127. package/modern/Heatmap/HeatmapTooltip.d.ts +0 -16
  128. package/modern/Heatmap/heatmapClasses.d.ts +0 -11
  129. package/modern/Heatmap/heatmapClasses.js +0 -14
  130. package/modern/Heatmap/index.d.ts +0 -4
  131. package/modern/Heatmap/index.js +0 -4
  132. package/modern/Heatmap/seriesConfig/extremums.d.ts +0 -2
  133. package/modern/Heatmap/seriesConfig/extremums.js +0 -8
  134. package/modern/Heatmap/seriesConfig/getColor.d.ts +0 -3
  135. package/modern/Heatmap/seriesConfig/getColor.js +0 -15
  136. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.d.ts +0 -3
  137. package/modern/Heatmap/seriesConfig/getSeriesWithDefaultValues.js +0 -8
  138. package/modern/Heatmap/seriesConfig/index.d.ts +0 -2
  139. package/modern/Heatmap/seriesConfig/index.js +0 -14
  140. package/modern/Heatmap/seriesConfig/seriesProcessor.d.ts +0 -3
  141. package/modern/Heatmap/seriesConfig/seriesProcessor.js +0 -21
  142. package/modern/Heatmap/seriesConfig/tooltip.d.ts +0 -3
  143. package/modern/Heatmap/seriesConfig/tooltip.js +0 -25
  144. package/modern/LineChartPro/LineChartPro.d.ts +0 -17
  145. package/modern/LineChartPro/LineChartPro.js +0 -401
  146. package/modern/LineChartPro/LineChartPro.plugins.d.ts +0 -4
  147. package/modern/LineChartPro/LineChartPro.plugins.js +0 -3
  148. package/modern/LineChartPro/index.d.ts +0 -1
  149. package/modern/LineChartPro/index.js +0 -1
  150. package/modern/ScatterChartPro/ScatterChartPro.d.ts +0 -17
  151. package/modern/ScatterChartPro/ScatterChartPro.js +0 -395
  152. package/modern/ScatterChartPro/ScatterChartPro.plugins.d.ts +0 -4
  153. package/modern/ScatterChartPro/ScatterChartPro.plugins.js +0 -3
  154. package/modern/ScatterChartPro/index.d.ts +0 -1
  155. package/modern/ScatterChartPro/index.js +0 -1
  156. package/modern/hooks/index.d.ts +0 -2
  157. package/modern/hooks/index.js +0 -2
  158. package/modern/hooks/useFunnelSeries.d.ts +0 -33
  159. package/modern/hooks/useFunnelSeries.js +0 -42
  160. package/modern/hooks/useHeatmapSeries.d.ts +0 -33
  161. package/modern/hooks/useHeatmapSeries.js +0 -42
  162. package/modern/hooks/zoom/index.d.ts +0 -1
  163. package/modern/hooks/zoom/index.js +0 -1
  164. package/modern/hooks/zoom/useIsZoomInteracting.d.ts +0 -6
  165. package/modern/hooks/zoom/useIsZoomInteracting.js +0 -14
  166. package/modern/index.d.ts +0 -34
  167. package/modern/index.js +0 -45
  168. package/modern/internals/plugins/allPlugins.d.ts +0 -8
  169. package/modern/internals/plugins/allPlugins.js +0 -6
  170. package/modern/internals/plugins/useChartProZoom/index.d.ts +0 -3
  171. package/modern/internals/plugins/useChartProZoom/index.js +0 -3
  172. package/modern/internals/plugins/useChartProZoom/useChartProZoom.d.ts +0 -3
  173. package/modern/internals/plugins/useChartProZoom/useChartProZoom.js +0 -350
  174. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.d.ts +0 -203
  175. package/modern/internals/plugins/useChartProZoom/useChartProZoom.selectors.js +0 -4
  176. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.d.ts +0 -53
  177. package/modern/internals/plugins/useChartProZoom/useChartProZoom.types.js +0 -1
  178. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.d.ts +0 -45
  179. package/modern/internals/plugins/useChartProZoom/useChartProZoom.utils.js +0 -126
  180. package/modern/internals/utils/releaseInfo.d.ts +0 -1
  181. package/modern/internals/utils/releaseInfo.js +0 -13
  182. package/modern/models/index.d.ts +0 -2
  183. package/modern/models/index.js +0 -2
  184. package/modern/models/seriesType/heatmap.d.ts +0 -28
  185. package/modern/models/seriesType/heatmap.js +0 -1
  186. package/modern/models/seriesType/index.d.ts +0 -1
  187. package/modern/models/seriesType/index.js +0 -1
  188. package/modern/package.json +0 -1
  189. package/modern/themeAugmentation/components.d.ts +0 -23
  190. package/modern/themeAugmentation/index.d.ts +0 -4
  191. package/modern/themeAugmentation/index.js +0 -0
  192. package/modern/themeAugmentation/overrides.d.ts +0 -11
  193. package/modern/themeAugmentation/props.d.ts +0 -20
  194. package/modern/typeOverloads/index.d.ts +0 -1
  195. package/modern/typeOverloads/index.js +0 -1
  196. package/modern/typeOverloads/modules.d.ts +0 -33
  197. package/modern/typeOverloads/modules.js +0 -1
  198. package/tsconfig.build.tsbuildinfo +0 -1
  199. /package/Heatmap/{HeatmapTooltip.d.ts → HeatmapTooltip/HeatmapTooltip.d.ts} +0 -0
  200. /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
- });
@@ -1,4 +0,0 @@
1
- export { Heatmap } from "./Heatmap.js";
2
- export { HeatmapPlot } from "./HeatmapPlot.js";
3
- export * from "./HeatmapTooltip.js";
4
- export * from "./heatmapClasses.js";
@@ -1,4 +0,0 @@
1
- export { Heatmap } from "./Heatmap.js";
2
- export { HeatmapPlot } from "./HeatmapPlot.js";
3
- export * from "./HeatmapTooltip.js";
4
- export * from "./heatmapClasses.js";
@@ -1,2 +0,0 @@
1
- import { CartesianExtremumGetter } from '@mui/x-charts/internals';
2
- export declare const getBaseExtremum: CartesianExtremumGetter<'heatmap'>;
@@ -1,8 +0,0 @@
1
- export const getBaseExtremum = params => {
2
- const {
3
- axis
4
- } = params;
5
- const minX = Math.min(...(axis.data ?? []));
6
- const maxX = Math.max(...(axis.data ?? []));
7
- return [minX, maxX];
8
- };
@@ -1,3 +0,0 @@
1
- import { ColorProcessor } from '@mui/x-charts/internals';
2
- declare const getColor: ColorProcessor<'heatmap'>;
3
- export default getColor;
@@ -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,3 +0,0 @@
1
- import { GetSeriesWithDefaultValues } from '@mui/x-charts/internals';
2
- declare const getSeriesWithDefaultValues: GetSeriesWithDefaultValues<'heatmap'>;
3
- export default getSeriesWithDefaultValues;
@@ -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,2 +0,0 @@
1
- import { ChartSeriesTypeConfig } from '@mui/x-charts/internals';
2
- export declare const seriesConfig: ChartSeriesTypeConfig<'heatmap'>;
@@ -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,3 +0,0 @@
1
- import { SeriesProcessor } from '@mui/x-charts/internals';
2
- declare const seriesProcessor: SeriesProcessor<'heatmap'>;
3
- export default seriesProcessor;
@@ -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,3 +0,0 @@
1
- import { TooltipGetter } from '@mui/x-charts/internals';
2
- declare const tooltipGetter: TooltipGetter<'heatmap'>;
3
- export default tooltipGetter;
@@ -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 };