Skip to content

Commit

Permalink
update AccidentCountByRoadLight as piechart
Browse files Browse the repository at this point in the history
  • Loading branch information
atalyaalon committed Dec 18, 2024
1 parent 219336d commit 3608524
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions src/components/molecules/widgets/AccidentCountByRoadLight.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
import React, { FC } from 'react';
import { IWidgetAccidentCountByRoadLight } from 'models/WidgetData';
import PieChartView from 'components/molecules/PieChartView';

const ROAD_LIGHT = 'road_light';
const COUNT = 'count';
const INNER_RADIUS = '40%';
const OUTER_RADIUS = '70%';
interface IProps {
data: IWidgetAccidentCountByRoadLight;
segmentText: string;
}

const AccidentCountByRoadLight: FC<IProps> = () => {
return <div> {} </div>;
const AccidentCountByRoadLight: FC<IProps> = ({ data }) => {
return (
<PieChartView
data={data.items}
xLabel={ROAD_LIGHT}
yLabel={COUNT}
outerRadius={OUTER_RADIUS}
innerRadius={INNER_RADIUS}
/>
);
};
export default AccidentCountByRoadLight;
export default AccidentCountByRoadLight;

0 comments on commit 3608524

Please sign in to comment.