File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
src/components/molecules/widgets Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 1
1
import React , { FC } from 'react' ;
2
2
import { IWidgetAccidentCountByRoadLight } from 'models/WidgetData' ;
3
+ import PieChartView from 'components/molecules/PieChartView' ;
3
4
5
+ const ROAD_LIGHT = 'road_light' ;
6
+ const COUNT = 'count' ;
7
+ const INNER_RADIUS = '40%' ;
8
+ const OUTER_RADIUS = '70%' ;
4
9
interface IProps {
5
- data : IWidgetAccidentCountByRoadLight ;
6
- segmentText : string ;
10
+ data : IWidgetAccidentCountByDriverType ;
7
11
}
8
12
9
- const AccidentCountByRoadLight : FC < IProps > = ( ) => {
10
- return < div > { } </ div > ;
13
+ const AccidentCountByRoadLight : FC < IProps > = ( { data } ) => {
14
+ return (
15
+ < PieChartView
16
+ data = { data . items }
17
+ xLabel = { ROAD_TYPE }
18
+ yLabel = { COUNT }
19
+ outerRadius = { OUTER_RADIUS }
20
+ innerRadius = { INNER_RADIUS }
21
+ />
22
+ ) ;
11
23
} ;
12
- export default AccidentCountByRoadLight ;
24
+ export default AccidentCountByRoadLight ;
You can’t perform that action at this time.
0 commit comments