New event data screen.
This commit is contained in:
@@ -9,7 +9,7 @@ export interface PieChartProps extends ChartProps {
|
||||
|
||||
export default function PieChart(props: PieChartProps) {
|
||||
const [tooltip, setTooltip] = useState(null);
|
||||
const { type } = props;
|
||||
const { type = 'pie' } = props;
|
||||
|
||||
const handleTooltip = ({ tooltip }) => {
|
||||
const { labelColors, dataPoints } = tooltip;
|
||||
@@ -23,5 +23,5 @@ export default function PieChart(props: PieChartProps) {
|
||||
);
|
||||
};
|
||||
|
||||
return <Chart {...props} type={type || 'pie'} tooltip={tooltip} onTooltip={handleTooltip} />;
|
||||
return <Chart {...props} type={type} tooltip={tooltip} onTooltip={handleTooltip} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user