-
-
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 remote-tracking branch 'upstream/master' into watermark
- Loading branch information
Showing
192 changed files
with
3,538 additions
and
1,887 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import * as React from 'react'; | ||
import Stack from '@mui/material/Stack'; | ||
import Box from '@mui/material/Box'; | ||
import Typography from '@mui/material/Typography'; | ||
import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; | ||
|
||
const settings = { | ||
valueFormatter: (v) => `${v}%`, | ||
height: 100, | ||
showTooltip: true, | ||
showHighlight: true, | ||
}; | ||
|
||
const smallValues = [0, 2, 3, 4, 6, 8, 7, 9, 15, 6, 8, 7, 12]; | ||
const largeValues = [60, 65, 66, 68, 87, 82, 83, 89, 92, 75, 76, 77, 91]; | ||
export default function CustomYAxis() { | ||
return ( | ||
<Stack sx={{ width: '100%' }}> | ||
<Typography>Without fixed y-range</Typography> | ||
<Stack sx={{ width: '100%', mb: 2 }} direction="row" spacing={2}> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<SparkLineChart data={smallValues} colors={['red']} {...settings} /> | ||
</Box> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<SparkLineChart data={largeValues} {...settings} /> | ||
</Box> | ||
</Stack> | ||
<Typography>With y-range fixed to [0, 100]</Typography> | ||
<Stack sx={{ width: '100%' }} direction="row" spacing={2}> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<SparkLineChart | ||
data={smallValues} | ||
yAxis={{ | ||
min: 0, | ||
max: 100, | ||
}} | ||
colors={['red']} | ||
{...settings} | ||
/> | ||
</Box> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<SparkLineChart | ||
data={largeValues} | ||
yAxis={{ | ||
min: 0, | ||
max: 100, | ||
}} | ||
{...settings} | ||
/> | ||
</Box> | ||
</Stack> | ||
</Stack> | ||
); | ||
} |
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,54 @@ | ||
import * as React from 'react'; | ||
import Stack from '@mui/material/Stack'; | ||
import Box from '@mui/material/Box'; | ||
import Typography from '@mui/material/Typography'; | ||
import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; | ||
|
||
const settings = { | ||
valueFormatter: (v: number | null) => `${v}%`, | ||
height: 100, | ||
showTooltip: true, | ||
showHighlight: true, | ||
} as const; | ||
|
||
const smallValues = [0, 2, 3, 4, 6, 8, 7, 9, 15, 6, 8, 7, 12]; | ||
const largeValues = [60, 65, 66, 68, 87, 82, 83, 89, 92, 75, 76, 77, 91]; | ||
export default function CustomYAxis() { | ||
return ( | ||
<Stack sx={{ width: '100%' }}> | ||
<Typography>Without fixed y-range</Typography> | ||
<Stack sx={{ width: '100%', mb: 2 }} direction="row" spacing={2}> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<SparkLineChart data={smallValues} colors={['red']} {...settings} /> | ||
</Box> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<SparkLineChart data={largeValues} {...settings} /> | ||
</Box> | ||
</Stack> | ||
<Typography>With y-range fixed to [0, 100]</Typography> | ||
<Stack sx={{ width: '100%' }} direction="row" spacing={2}> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<SparkLineChart | ||
data={smallValues} | ||
yAxis={{ | ||
min: 0, | ||
max: 100, | ||
}} | ||
colors={['red']} | ||
{...settings} | ||
/> | ||
</Box> | ||
<Box sx={{ flexGrow: 1 }}> | ||
<SparkLineChart | ||
data={largeValues} | ||
yAxis={{ | ||
min: 0, | ||
max: 100, | ||
}} | ||
{...settings} | ||
/> | ||
</Box> | ||
</Stack> | ||
</Stack> | ||
); | ||
} |
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
Oops, something went wrong.