mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-07 04:39:06 +02:00
36 lines
577 B
JavaScript
36 lines
577 B
JavaScript
const data = [];
|
|
for (let rad = 0; rad <= Math.PI * 2; rad += Math.PI / 45) {
|
|
data.push({
|
|
x: Math.cos(rad),
|
|
y: Math.sin(rad)
|
|
});
|
|
}
|
|
|
|
module.exports = {
|
|
config: {
|
|
type: 'line',
|
|
data: {
|
|
datasets: [{
|
|
data,
|
|
fill: 'shape',
|
|
backgroundColor: 'rgba(255, 0, 0, 0.5)',
|
|
}]
|
|
},
|
|
options: {
|
|
plugins: {
|
|
legend: false
|
|
},
|
|
scales: {
|
|
x: {
|
|
type: 'linear',
|
|
display: false
|
|
},
|
|
y: {
|
|
type: 'linear',
|
|
display: false
|
|
},
|
|
},
|
|
}
|
|
}
|
|
};
|