Loading
Source Code
- JavaScript
- HTML
- data.js
import { Chart } from 'singledivui';
import 'singledivui/dist/singledivui.min.css';
import scatterChartData from './data.js';
const options = {
type: "scatter",
data: {
series: {
scatterShape: "square",
points: scatterChartData
}
},
graphSettings: {
gridLineSize: 0,
xAxis: {
customScale: {
min: 0,
max: 120
}
},
yAxis: {
customScale: {
min: 0,
max: 120
}
}
}
};
new Chart('#chart-demo', options);
<div id="chart-demo"></div>
export default [{
"x": 6,
"y": 8
}, {
"x": 10,
"y": 18
}, {
"x": 13,
"y": 28
}, {
"x": 17,
"y": 20
}, {
"x": 18,
"y": 30
}, {
"x": 24,
"y": 40
}, {
"x": 25,
"y": 30
}, {
"x": 28,
"y": 55
}, {
"x": 30,
"y": 22
}, {
"x": 30,
"y": 45
}, {
"x": 33,
"y": 35
}, {
"x": 37,
"y": 62
}, {
"x": 38,
"y": 43
}, {
"x": 40,
"y": 30
}, {
"x": 43,
"y": 72
}, {
"x": 45,
"y": 58
}, {
"x": 49,
"y": 45
}, {
"x": 53,
"y": 68
}, {
"x": 55,
"y": 35
}, {
"x": 55,
"y": 80
}, {
"x": 61,
"y": 74
}, {
"x": 63,
"y": 60
}, {
"x": 65,
"y": 45
}, {
"x": 67,
"y": 85
}, {
"x": 71,
"y": 57
}, {
"x": 75,
"y": 47
}, {
"x": 75,
"y": 98
}, {
"x": 76,
"y": 75
}, {
"x": 77,
"y": 84
}, {
"x": 80,
"y": 62
}, {
"x": 85,
"y": 110
}, {
"x": 88,
"y": 55
}, {
"x": 89,
"y": 76
}, {
"x": 90,
"y": 99
}, {
"x": 95,
"y": 87
}, {
"x": 97,
"y": 115
}, {
"x": 99,
"y": 81
}, {
"x": 100,
"y": 70
}, {
"x": 103,
"y": 105
}, {
"x": 108,
"y": 98
}, {
"x": 110,
"y": 85
}, {
"x": 110,
"y": 116
}, {
"x": 115,
"y": 107
}]