File tree Expand file tree Collapse file tree 8 files changed +37
-8
lines changed Expand file tree Collapse file tree 8 files changed +37
-8
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ export default function PrintChart() {
59
59
< MenuItem value = "heatmap" > Heatmap</ MenuItem >
60
60
</ Select >
61
61
</ FormControl >
62
- < Button onClick = { ( ) => apiRef . current . exportAsPrint ( ) } variant = "contained" >
62
+ < Button onClick = { ( ) => apiRef . current . exportAsPrint } variant = "contained" >
63
63
Print
64
64
</ Button >
65
65
</ Stack >
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ export default function PrintChart() {
61
61
< MenuItem value = "heatmap" > Heatmap</ MenuItem >
62
62
</ Select >
63
63
</ FormControl >
64
- < Button onClick = { ( ) => apiRef . current ! . exportAsPrint ( ) } variant = "contained" >
64
+ < Button onClick = { ( ) => apiRef . current ! . exportAsPrint } variant = "contained" >
65
65
Print
66
66
</ Button >
67
67
</ Stack >
Original file line number Diff line number Diff line change
1
+ export const heatmapData = [
2
+ [ 0 , 0 , 10 ] ,
3
+ [ 0 , 1 , 20 ] ,
4
+ [ 0 , 2 , 40 ] ,
5
+ [ 0 , 3 , 90 ] ,
6
+ [ 0 , 4 , 70 ] ,
7
+ [ 1 , 0 , 30 ] ,
8
+ [ 1 , 1 , 50 ] ,
9
+ [ 1 , 2 , 10 ] ,
10
+ [ 1 , 3 , 70 ] ,
11
+ [ 1 , 4 , 40 ] ,
12
+ [ 2 , 0 , 50 ] ,
13
+ [ 2 , 1 , 20 ] ,
14
+ [ 2 , 2 , 90 ] ,
15
+ [ 2 , 3 , 20 ] ,
16
+ [ 2 , 4 , 70 ] ,
17
+ [ 3 , 0 , 40 ] ,
18
+ [ 3 , 1 , 50 ] ,
19
+ [ 3 , 2 , 20 ] ,
20
+ [ 3 , 3 , 70 ] ,
21
+ [ 3 , 4 , 90 ] ,
22
+ ] ;
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ type PluginsPerSeriesType = {
13
13
bar : BarChartProPluginsSignatures ;
14
14
} ;
15
15
16
+ /**
17
+ * The API of the chart `apiRef` object.
18
+ * The chart type can be passed as the first generic parameter to narrow down the API to the specific chart type.
19
+ * @example ChartProApi<'bar'>
20
+ */
16
21
export type ChartProApi <
17
22
TSeries extends ChartSeriesType = ChartSeriesType ,
18
23
TSignatures extends
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import {
13
13
ChartSeriesConfig ,
14
14
XAxis ,
15
15
YAxis ,
16
+ ChartsRootSurface ,
16
17
} from '@mui/x-charts/internals' ;
17
18
import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath' ;
18
19
import {
@@ -22,7 +23,6 @@ import {
22
23
ChartsOverlaySlots ,
23
24
} from '@mui/x-charts/ChartsOverlay' ;
24
25
import { DEFAULT_X_AXIS_KEY , DEFAULT_Y_AXIS_KEY } from '@mui/x-charts/constants' ;
25
- import { ChartsRootSurface } from '@mui/x-charts/ChartsRootSurface' ;
26
26
import { useChartContainerProProps } from '../ChartContainerPro/useChartContainerProProps' ;
27
27
import { ChartDataProviderPro } from '../ChartDataProviderPro' ;
28
28
import { ChartContainerProProps } from '../ChartContainerPro' ;
@@ -235,7 +235,10 @@ Heatmap.propTypes = {
235
235
// | To update them edit the TypeScript types and run "pnpm proptypes" |
236
236
// ----------------------------------------------------------------------
237
237
apiRef : PropTypes . shape ( {
238
- current : PropTypes . object ,
238
+ current : PropTypes . shape ( {
239
+ exportAsImage : PropTypes . func . isRequired ,
240
+ exportAsPrint : PropTypes . func . isRequired ,
241
+ } ) ,
239
242
} ) ,
240
243
className : PropTypes . string ,
241
244
/**
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
import * as React from 'react' ;
2
2
import useForkRef from '@mui/utils/useForkRef' ;
3
- import { ChartsSurface , ChartsSurfaceProps } from '../ChartsSurface' ;
4
- import { useChartRootRef } from '../hooks' ;
3
+ import { ChartsSurface , ChartsSurfaceProps } from '../../ ChartsSurface' ;
4
+ import { useChartRootRef } from '../../ hooks' ;
5
5
6
6
export interface ChartsRootSurfaceProps extends ChartsSurfaceProps { }
7
7
Original file line number Diff line number Diff line change 1
1
// Components
2
2
export * from './components/ChartsAxesGradients' ;
3
3
export * from './components/ChartsWrapper' ;
4
+ export * from './components/ChartsRootSurface' ;
4
5
export * from '../ChartsLabel/ChartsLabelMark' ;
5
6
6
7
// hooks
@@ -31,7 +32,6 @@ export * from './store/useStore';
31
32
export * from './store/useSelector' ;
32
33
33
34
// plugins configs
34
-
35
35
export * from '../BarChart/BarChart.plugins' ;
36
36
export * from '../LineChart/LineChart.plugins' ;
37
37
export * from '../ScatterChart/ScatterChart.plugins' ;
You can’t perform that action at this time.
0 commit comments