Closed keanacobarde closed 9 months ago
Installation guide:
npm install chart.js react-chartjs-2
The first dependency will install chart.js itself, which can be used in vanilla JS. react-chartjs-2 is used as a React wrapper which will allow for an easier time with implementing chart.js within React.
IMPORTS
import { Chart as ChartJS } from 'chart.js/auto';
import { Doughtnut } from 'react-chartjs-2';
Taken from Chart.js documentation - a Vanilla JS setup. Find the React component.
const data = {
labels: [
'Red',
'Blue',
'Yellow'
],
datasets: [{
label: 'My First Dataset',
data: [300, 50, 100],
backgroundColor: [
'rgb(255, 99, 132)',
'rgb(54, 162, 235)',
'rgb(255, 205, 86)'
],
hoverOffset: 4
}]
};
CURRENT COURSE OF ACTION:
IMPLEMENTATION COMPLETED WITHIN #50 - CLOSING TICKET
User Story
Acceptance Criteria
WIREFRAME
Dependecies
N / A - All data required for this exists within FireBase already. It's just getting around to using Chart.js in order to visualize the information.
Dev Notes