Created
July 1, 2020 00:46
-
-
Save hadnazzar/0f7f0dea8ef7b83fbc6dabcfc6b63f86 to your computer and use it in GitHub Desktop.
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
import React from 'react'; | |
import {Polar} from 'react-chartjs-2'; | |
const data = { | |
datasets: [{ | |
data: [ | |
11, | |
16, | |
7, | |
3, | |
14 | |
], | |
backgroundColor: [ | |
'#FF6384', | |
'#4BC0C0', | |
'#FFCE56', | |
'#E7E9ED', | |
'#36A2EB' | |
], | |
label: 'My dataset' // for legend | |
}], | |
labels: [ | |
'Red', | |
'Green', | |
'Yellow', | |
'Grey', | |
'Blue' | |
] | |
}; | |
export default () => ( | |
<div> | |
<h2>Polar Example</h2> | |
<Polar | |
data={data} | |
width={400} | |
height={400} | |
/> | |
</div> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment