Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Analytics Section: Pie Charts of Number of reported Diseases #279

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Analytics Section: Pie Charts of Number of reported Diseases #279

wants to merge 2 commits into from

Conversation

rheo-chiti
Copy link

@rheo-chiti rheo-chiti commented Mar 31, 2020

This solves #285

Pie Chart Screen
In the Analytics Section, users can view the graphs, charts, trends of reports and status of an area.
Users can view the number of diseases reported in a pie chart format.

image

Data is fetched from firebase and converted into meaningful data to be used for trends screen with the help of react-native-svg-charts.

This code snippet will convert the data into meaningful data:-

for (let i = 0; i < diseases.length - 1; i++) {
if (diseases[i] == diseases[i + 1]) {
count++;
}
else {
data.push({
key: key,
amount: count+1,
})
count=0;
key++;
}
}

@rheo-chiti rheo-chiti changed the title added bar chart Analytics Section: Pie Charts of Number of reported Diseases Apr 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant