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.
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:
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'
}
]
};