-
-
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.
- Loading branch information
1 parent
2d918a0
commit ecdb48c
Showing
7 changed files
with
98 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import * as React from 'react'; | ||
import Stack from '@mui/material/Stack'; | ||
import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; | ||
|
||
const settings = { | ||
height: 100, | ||
yAxis: { min: 0, max: 100 }, | ||
}; | ||
|
||
const values = [0, 2, 3, 4, 6, 8, 7, 9, 15, 6, 8, 7, 12]; | ||
|
||
export default function ColorCustomization() { | ||
return ( | ||
<Stack sx={{ width: '100%' }}> | ||
<SparkLineChart data={values} color="green" {...settings} /> | ||
</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,18 @@ | ||
import * as React from 'react'; | ||
import Stack from '@mui/material/Stack'; | ||
import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; | ||
|
||
const settings = { | ||
height: 100, | ||
yAxis: { min: 0, max: 100 }, | ||
} as const; | ||
|
||
const values = [0, 2, 3, 4, 6, 8, 7, 9, 15, 6, 8, 7, 12]; | ||
|
||
export default function ColorCustomization() { | ||
return ( | ||
<Stack sx={{ width: '100%' }}> | ||
<SparkLineChart data={values} color="green" {...settings} /> | ||
</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 @@ | ||
<SparkLineChart data={values} color="green" {...settings} /> |
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,22 @@ | ||
import * as React from 'react'; | ||
import Stack from '@mui/material/Stack'; | ||
import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; | ||
|
||
const settings = { | ||
height: 100, | ||
yAxis: { min: 0, max: 100 }, | ||
}; | ||
|
||
const values = [0, 2, 3, 4, 6, 8, 7, 9, 15, 6, 8, 7, 12]; | ||
|
||
export default function ColorCustomizationMode() { | ||
return ( | ||
<Stack sx={{ width: '100%' }}> | ||
<SparkLineChart | ||
data={values} | ||
color={(mode) => (mode === 'light' ? 'black' : 'white')} | ||
{...settings} | ||
/> | ||
</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,22 @@ | ||
import * as React from 'react'; | ||
import Stack from '@mui/material/Stack'; | ||
import { SparkLineChart } from '@mui/x-charts/SparkLineChart'; | ||
|
||
const settings = { | ||
height: 100, | ||
yAxis: { min: 0, max: 100 }, | ||
} as const; | ||
|
||
const values = [0, 2, 3, 4, 6, 8, 7, 9, 15, 6, 8, 7, 12]; | ||
|
||
export default function ColorCustomizationMode() { | ||
return ( | ||
<Stack sx={{ width: '100%' }}> | ||
<SparkLineChart | ||
data={values} | ||
color={(mode) => (mode === 'light' ? 'black' : 'white')} | ||
{...settings} | ||
/> | ||
</Stack> | ||
); | ||
} |
5 changes: 5 additions & 0 deletions
5
docs/data/charts/sparkline/ColorCustomizationMode.tsx.preview
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,5 @@ | ||
<SparkLineChart | ||
data={values} | ||
color={(mode) => (mode === 'light' ? 'black' : 'white')} | ||
{...settings} | ||
/> |
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