Skip to content

Instantly share code, notes, and snippets.

@hadnazzar
Created July 1, 2020 00:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hadnazzar/0f7f0dea8ef7b83fbc6dabcfc6b63f86 to your computer and use it in GitHub Desktop.
Save hadnazzar/0f7f0dea8ef7b83fbc6dabcfc6b63f86 to your computer and use it in GitHub Desktop.
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