-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1161 from data-for-change/add_killed_and_injured_…
…count_per_age_group_stacked Add killed and injured count per age group stacked
- Loading branch information
Showing
7 changed files
with
40 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/components/molecules/widgets/KilledAndInjuredCountPerAgeGroupStackedWidget.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React, { FC } from 'react'; | ||
import { IWidgetMultiBarData } from 'models/WidgetData'; | ||
import { createBarWidget } from 'utils/barChart.utils'; | ||
import { MultiBarChart } from '../GenericBarChart'; | ||
|
||
|
||
interface IProps { | ||
data: IWidgetMultiBarData; | ||
editorBarOptions: Record<number, boolean>; | ||
} | ||
|
||
const KilledAndInjuredCountPerAgeGroupStackedWidget: FC<IProps> = ({ data, editorBarOptions }) => { | ||
const { text } = data; | ||
const multiBarSeries = createBarWidget(data, editorBarOptions); | ||
return <MultiBarChart isStacked={true} isPercentage={false} data={multiBarSeries} | ||
textLabel={text.title} | ||
customYLabels={Object.values(text.labels_map)} | ||
subtitle={text.subtitle} | ||
editorBarOptions={editorBarOptions} />; | ||
}; | ||
export default KilledAndInjuredCountPerAgeGroupStackedWidget; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters