[英]How do you join the points in an ECharts scatter charts?
line vs scatter I would like to join the points with a line in the scatter charts, like Scatter Line Chart in Chart.js adding showLine: true.线与散点图我想在散点图中用一条线连接点,例如 Chart.js 中的散点线图添加 showLine:true。
option = {
xAxis: {},
yAxis: {},
series: [
{
symbolSize: 20,
data: [
[10.0, 8.04],
[8.07, 6.95],
[7.07, 6.95],
[13.0, 7.58]
],
type: 'scatter'
},
{
symbolSize: 1,
color: 'red',
data: [
[3.0, 8],
[3.0, 4],
],
type: 'line',
lineStyle: {
"width": "2"
},
}
]
};
Instead of drawing lineS on the scatter chart, you can draw scatter on the line chart, they will have exactly same effect:您可以在折线图上绘制散点,而不是在散点图上绘制 lineS,它们将具有完全相同的效果:
Here's the config for it:这是它的配置:
option = {
xAxis: {},
yAxis: {},
series: [
{
symbolSize: 20,
data: [
[7.07, 6.95],
[8.07, 6.95],
[10.0, 8.04],
[13.0, 7.58]
],
symbol: 'circle',
type: 'line'
}
]
};
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.