import * as React from 'react'; import { PieChart, IPieChartProps } from '@fluentui/react-charting'; import { Stack, StackItem } from '@fluentui/react'; import type { JSXElement } from '@fluentui/utilities'; export class PieChartBasicExample extends React.Component { constructor(props: IPieChartProps) { super(props); this.state = { height: 350, width: 600, }; } public componentDidMount(): void { const style = document.createElement('style'); const focusStylingCSS = ` .containerDiv [contentEditable=true]:focus, .containerDiv [tabindex]:focus, .containerDiv area[href]:focus, .containerDiv button:focus, .containerDiv iframe:focus, .containerDiv input:focus, .containerDiv select:focus, .containerDiv textarea:focus { outline: -webkit-focus-ring-color auto 5px; } `; style.appendChild(document.createTextNode(focusStylingCSS)); document.head.appendChild(style); } public render(): JSXElement { const points = [ { y: 50, x: 'ABCD' }, { y: 25, x: 'EFGH' }, { y: 25, x: 'IJKL' }, ]; return (
); } private _onWidthChange = (e: React.ChangeEvent) => { this.setState({ width: parseInt(e.target.value, 10) }); }; private _onHeightChange = (e: React.ChangeEvent) => { this.setState({ height: parseInt(e.target.value, 10) }); }; }