Scatter
散点图。
使用
<m-scatter id="myScatter" width="600" height="300" data=" {
datasets: [{
label: 'My First dataset',
borderColor: 'rgb(255, 99, 132)',
backgroundColor: 'rgba(255, 99, 132, .2)',
data: [{
x: 50,
y: 32
}, {
x: 22,
y: 10
}, {
x: 80,
y: 44
}, {
x: 22,
y: 77
}, {
x: 3,
y: 9
}, {
x: 44,
y: 11
}, {
x: 12,
y: 100
}]
}, {
label: 'My Second dataset',
borderColor: 'rgb(54, 162, 235)',
backgroundColor: 'rgba(54, 162, 235, .2)',
data: [{
x: 20,
y: 132
}, {
x: 32,
y: 40
}, {
x: 80,
y: 84
}, {
x: 32,
y: 77
}, {
x: 13,
y: 9
}, {
x: 24,
y: 11
}, {
x: 12,
y: 60
}]
}]
}"
options="{
title: {
display: true,
text: 'Omim Scatter Chart'
}
}">
</m-scatter>
API
Props
{
data: object,
options: object,
width: number,
height: number
}