you can understand this as a line chart.
also comes from the question and answer. In fact, there is something wrong with my own description. In fact, the effect I want to achieve is the following, and the difference is not big.
now I draw points directly with line, which is, after all, drawn by data. Just calculate the four points and connect them through a broken line.
it is important to note, however, that the category axis is distinguished from the non-category axis. At first, I didn't figure it out, so when drawing, the data will be drawn based on the category axis, and as a result, the second set of data will be drawn from the first one of the category axis, so there may be overlap, and it's not the effect we want. No, no, no.
the successful code of the simple experiment is as follows:
option = {
title:{
text:'' ,
left:'center'
},
tooltip:{
show:true,
},
dimensions:[
'from','to','profit'
],
encode:{
tooltip:[0,1,2]
},
xAxis: {
type: 'value',
interval:30
},
yAxis: {
type: 'value'
},
series: [{
data: [
//x y
[ 0, 0, 1],
[ 20, 20, 2],
[ 40, 20, 2],
[ 60, 0, 2]
],
type: 'line',
areaStyle: {}
},
{
data: [//x y
[ 65, 0, 1],
[ 88, 45, 2],
[ 100, 45, 2],
[ 123, 0, 2]
],
type: 'line',
areaStyle: {}
},
{
data: [],
type: 'line',
areaStyle: {}
}]
};