import * as React from 'react';
import {
StackedBarChart,
IChartProps,
IChartDataPoint,
DataVizPalette,
getColorFromToken,
} from '@fluentui/react-charting';
import { Checkbox } from '@fluentui/react';
import { Toggle } from '@fluentui/react/lib/Toggle';
import type { JSXElement } from '@fluentui/utilities';
interface IStackedBarState {
hideTooltip: boolean;
enableGradient: boolean;
roundCorners: boolean;
}
export class StackedBarChartBasicExample extends React.Component<{}, IStackedBarState> {
constructor(props = {}) {
super(props);
this.state = {
hideTooltip: false,
enableGradient: false,
roundCorners: false,
};
}
public render(): JSXElement {
const points: IChartDataPoint[] = [
{
legend: 'first',
data: 3000000,
color: getColorFromToken(DataVizPalette.color1),
xAxisCalloutData: '2020/04/30',
yAxisCalloutData: '99%',
},
{ legend: 'second', data: 1, color: getColorFromToken(DataVizPalette.color5) },
];
const data0: IChartProps = {
chartTitle: 'Stacked Bar chart example',
chartData: points,
};
const data1: IChartProps = {
chartTitle: 'Stacked Bar chart example with ignore fix style',
chartData: points,
};
return (
<>