-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'mui:master' into fix-no-results-overlay-dark-demo
- Loading branch information
Showing
208 changed files
with
3,298 additions
and
1,226 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
Broken links found by `docs:link-check` that exist: | ||
|
||
- https://mui.com/x/react-charts/heat-map/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import '@mui/x-charts-pro/typeOverloads'; | ||
import { UnstableHeatmap } from '@mui/x-charts-pro/Heatmap'; | ||
import { data } from './dumbData'; | ||
|
||
export default function BasicHeatmap() { | ||
return ( | ||
<Box sx={{ width: '100%', maxWidth: 400 }}> | ||
<UnstableHeatmap | ||
xAxis={[{ data: [1, 2, 3, 4] }]} | ||
yAxis={[{ data: ['A', 'B', 'C', 'D', 'E'] }]} | ||
series={[{ data }]} | ||
margin={{ top: 5, right: 5, left: 20 }} | ||
height={300} | ||
/> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import '@mui/x-charts-pro/typeOverloads'; | ||
import { UnstableHeatmap } from '@mui/x-charts-pro/Heatmap'; | ||
import { data } from './dumbData'; | ||
|
||
export default function BasicHeatmap() { | ||
return ( | ||
<Box sx={{ width: '100%', maxWidth: 400 }}> | ||
<UnstableHeatmap | ||
xAxis={[{ data: [1, 2, 3, 4] }]} | ||
yAxis={[{ data: ['A', 'B', 'C', 'D', 'E'] }]} | ||
series={[{ data }]} | ||
margin={{ top: 5, right: 5, left: 20 }} | ||
height={300} | ||
/> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<UnstableHeatmap | ||
xAxis={[{ data: [1, 2, 3, 4] }]} | ||
yAxis={[{ data: ['A', 'B', 'C', 'D', 'E'] }]} | ||
series={[{ data }]} | ||
margin={{ top: 5, right: 5, left: 20 }} | ||
height={300} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
import * as React from 'react'; | ||
import { interpolateBlues } from 'd3-scale-chromatic'; | ||
import '@mui/x-charts-pro/typeOverloads'; | ||
import { UnstableHeatmap } from '@mui/x-charts-pro/Heatmap'; | ||
|
||
const dataset = [ | ||
{ | ||
london: 59, | ||
paris: 57, | ||
newYork: 86, | ||
seoul: 21, | ||
month: 'January', | ||
}, | ||
{ | ||
london: 50, | ||
paris: 52, | ||
newYork: 78, | ||
seoul: 28, | ||
month: 'February', | ||
}, | ||
{ | ||
london: 47, | ||
paris: 53, | ||
newYork: 106, | ||
seoul: 41, | ||
month: 'March', | ||
}, | ||
{ | ||
london: 54, | ||
paris: 56, | ||
newYork: 92, | ||
seoul: 73, | ||
month: 'April', | ||
}, | ||
{ | ||
london: 57, | ||
paris: 69, | ||
newYork: 92, | ||
seoul: 99, | ||
month: 'May', | ||
}, | ||
{ | ||
london: 60, | ||
paris: 63, | ||
newYork: 103, | ||
seoul: 144, | ||
month: 'June', | ||
}, | ||
{ | ||
london: 59, | ||
paris: 60, | ||
newYork: 105, | ||
seoul: 319, | ||
month: 'July', | ||
}, | ||
{ | ||
london: 65, | ||
paris: 60, | ||
newYork: 106, | ||
seoul: 249, | ||
month: 'August', | ||
}, | ||
{ | ||
london: 51, | ||
paris: 51, | ||
newYork: 95, | ||
seoul: 131, | ||
month: 'September', | ||
}, | ||
{ | ||
london: 60, | ||
paris: 65, | ||
newYork: 97, | ||
seoul: 55, | ||
month: 'October', | ||
}, | ||
{ | ||
london: 67, | ||
paris: 64, | ||
newYork: 76, | ||
seoul: 48, | ||
month: 'November', | ||
}, | ||
{ | ||
london: 61, | ||
paris: 70, | ||
newYork: 103, | ||
seoul: 25, | ||
month: 'December', | ||
}, | ||
]; | ||
|
||
const data = dataset.flatMap(({ london, paris, newYork, seoul }, monthIndex) => [ | ||
[0, monthIndex, london], | ||
[1, monthIndex, paris], | ||
[2, monthIndex, newYork], | ||
[3, monthIndex, seoul], | ||
]); | ||
|
||
const xData = ['London', 'Paris', 'NewYork', 'Seoul']; | ||
const yData = dataset.flatMap(({ month }) => month); | ||
|
||
export default function ColorConfig() { | ||
return ( | ||
<UnstableHeatmap | ||
height={400} | ||
width={600} | ||
xAxis={[{ data: xData }]} | ||
yAxis={[{ data: yData }]} | ||
series={[{ data }]} | ||
zAxis={[ | ||
{ | ||
min: 20, | ||
max: 300, | ||
colorMap: { | ||
type: 'continuous', | ||
color: interpolateBlues, | ||
}, | ||
}, | ||
]} | ||
/> | ||
); | ||
} |
Oops, something went wrong.