Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ interface Data {

export const ChartPieCustomColorScale: React.FunctionComponent = () => {
const data: Data[] = [
{ x: 'Sky', y: 38 },
{ x: 'Shady side of pyramid', y: 7 },
{ x: 'Sunny side of pyramid', y: 17 },
{ x: 'Sky', y: 38 }
{ x: 'Sky', y: 76 }
];
const legendData: Data[] = [{ name: 'Sky' }, { name: 'Shady side of pyramid' }, { name: 'Sunny side of pyramid' }];
const pyramidStartAngle = 0.38 * 360;

return (
<div style={{ height: '230px', width: '450px' }}>
<ChartPie
ariaDesc="Average number of pets"
ariaTitle="Pie chart example"
colorScale={[
chart_theme_blue_ColorScale_100.var,
chart_theme_orange_ColorScale_300.var,
chart_theme_yellow_ColorScale_100.var,
chart_theme_blue_ColorScale_100.var
Expand All @@ -37,6 +36,8 @@ export const ChartPieCustomColorScale: React.FunctionComponent = () => {
legendOrientation="vertical"
legendPosition="right"
name="chart2"
endAngle={pyramidStartAngle + 360}
startAngle={pyramidStartAngle}
padding={{
bottom: 20,
left: 20,
Expand Down
Loading