-
-
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 commit '7eccbd00caafa6911f8ae3f0a3318614cdc02eaf' into update-t…
…ooltip-design
- Loading branch information
Showing
506 changed files
with
11,821 additions
and
6,106 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
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import * as React from 'react'; | ||
import { BarChart } from '@mui/x-charts/BarChart'; | ||
|
||
export default function GradientTooltip() { | ||
return ( | ||
<BarChart | ||
sx={{ | ||
'--my-custom-gradient': 'url(#GlobalGradient)', | ||
}} | ||
slotProps={{ | ||
tooltip: { | ||
sx: { | ||
'--my-custom-gradient': 'linear-gradient(0deg, #123456, #81b2e4);', | ||
}, | ||
}, | ||
}} | ||
series={[ | ||
{ | ||
label: 'series A', | ||
data: [50], | ||
}, | ||
{ | ||
label: 'series B', | ||
data: [100], | ||
color: 'var(--my-custom-gradient, #123456)', | ||
}, | ||
]} | ||
width={400} | ||
height={200} | ||
> | ||
<linearGradient id="GlobalGradient" x1="0%" y1="100%" x2="0%" y2="0%"> | ||
<stop offset="0" stopColor="#123456" /> | ||
<stop offset="1" stopColor="#81b2e4" /> | ||
</linearGradient> | ||
</BarChart> | ||
); | ||
} |
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,37 @@ | ||
import * as React from 'react'; | ||
import { BarChart } from '@mui/x-charts/BarChart'; | ||
|
||
export default function GradientTooltip() { | ||
return ( | ||
<BarChart | ||
sx={{ | ||
'--my-custom-gradient': 'url(#GlobalGradient)', | ||
}} | ||
slotProps={{ | ||
tooltip: { | ||
sx: { | ||
'--my-custom-gradient': 'linear-gradient(0deg, #123456, #81b2e4);', | ||
}, | ||
}, | ||
}} | ||
series={[ | ||
{ | ||
label: 'series A', | ||
data: [50], | ||
}, | ||
{ | ||
label: 'series B', | ||
data: [100], | ||
color: 'var(--my-custom-gradient, #123456)', | ||
}, | ||
]} | ||
width={400} | ||
height={200} | ||
> | ||
<linearGradient id="GlobalGradient" x1="0%" y1="100%" x2="0%" y2="0%"> | ||
<stop offset="0" stopColor="#123456" /> | ||
<stop offset="1" stopColor="#81b2e4" /> | ||
</linearGradient> | ||
</BarChart> | ||
); | ||
} |
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,44 @@ | ||
import * as React from 'react'; | ||
import { PieChart } from '@mui/x-charts/PieChart'; | ||
|
||
export default function PatternPie() { | ||
return ( | ||
<PieChart | ||
sx={{ | ||
'--my-custom-pattern': 'url(#Pattern)', | ||
}} | ||
series={[ | ||
{ | ||
data: [ | ||
{ id: 0, value: 10, label: 'series A' }, | ||
{ id: 1, value: 15, label: 'series B' }, | ||
{ | ||
id: 2, | ||
value: 20, | ||
label: 'series C', | ||
color: 'var(--my-custom-pattern, #123456)', | ||
}, | ||
], | ||
}, | ||
]} | ||
width={400} | ||
height={200} | ||
> | ||
<pattern | ||
id="Pattern" | ||
patternUnits="userSpaceOnUse" | ||
width="20" | ||
height="40" | ||
patternTransform="scale(0.5)" | ||
> | ||
<rect x="0" y="0" width="100%" height="100%" fill="#123456" /> | ||
<path | ||
d="M0 30h20L10 50zm-10-20h20L0 30zm20 0h20L20 30zM0-10h20L10 10z" | ||
strokeWidth="1" | ||
stroke="#81b2e4" | ||
fill="none" | ||
/> | ||
</pattern> | ||
</PieChart> | ||
); | ||
} |
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,44 @@ | ||
import * as React from 'react'; | ||
import { PieChart } from '@mui/x-charts/PieChart'; | ||
|
||
export default function PatternPie() { | ||
return ( | ||
<PieChart | ||
sx={{ | ||
'--my-custom-pattern': 'url(#Pattern)', | ||
}} | ||
series={[ | ||
{ | ||
data: [ | ||
{ id: 0, value: 10, label: 'series A' }, | ||
{ id: 1, value: 15, label: 'series B' }, | ||
{ | ||
id: 2, | ||
value: 20, | ||
label: 'series C', | ||
color: 'var(--my-custom-pattern, #123456)', | ||
}, | ||
], | ||
}, | ||
]} | ||
width={400} | ||
height={200} | ||
> | ||
<pattern | ||
id="Pattern" | ||
patternUnits="userSpaceOnUse" | ||
width="20" | ||
height="40" | ||
patternTransform="scale(0.5)" | ||
> | ||
<rect x="0" y="0" width="100%" height="100%" fill="#123456" /> | ||
<path | ||
d="M0 30h20L10 50zm-10-20h20L0 30zm20 0h20L20 30zM0-10h20L10 10z" | ||
strokeWidth="1" | ||
stroke="#81b2e4" | ||
fill="none" | ||
/> | ||
</pattern> | ||
</PieChart> | ||
); | ||
} |
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.