mirror of
https://github.com/chartjs/Chart.js.git
synced 2024-10-06 12:19:08 +02:00
44 lines
689 B
JavaScript
44 lines
689 B
JavaScript
|
const data = [];
|
||
|
for (let x = 0; x < 3; x++) {
|
||
|
for (let y = 0; y < 3; y++) {
|
||
|
data.push({x, y});
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
config: {
|
||
|
type: 'scatter',
|
||
|
data: {
|
||
|
datasets: [{
|
||
|
data,
|
||
|
backgroundColor: 'red',
|
||
|
radius: 1,
|
||
|
hoverRadius: 0
|
||
|
}],
|
||
|
},
|
||
|
options: {
|
||
|
scales: {
|
||
|
x: {display: false},
|
||
|
y: {display: false}
|
||
|
},
|
||
|
plugins: {
|
||
|
legend: false,
|
||
|
title: {
|
||
|
display: true,
|
||
|
text: () => 'Title Text',
|
||
|
},
|
||
|
filler: false,
|
||
|
tooltip: false
|
||
|
},
|
||
|
},
|
||
|
|
||
|
},
|
||
|
options: {
|
||
|
spriteText: true,
|
||
|
canvas: {
|
||
|
height: 400,
|
||
|
width: 400
|
||
|
}
|
||
|
}
|
||
|
};
|