Echarts在处理大量数据时无法呈现平滑的线条
Echars can not render a smooth line when it process alot of data
我正在使用 Echarts 构建折线图,我需要它是平滑的。我尝试了 smooth: true
或 smooth: 1.5
,但当图形包含大量数据时它无济于事。 2000条左右的数据如何处理?
这是我的代码:
option = {
xAxis: {
type: 'category',
},
yAxis: {
type: 'value'
},
series: [{
data: [["12",0],["23",1],["32",1],["40",2],["42",2],["72",3]...],
type: 'line',
smooth: true
}]
};
Brake Echarts graph
如果您需要得到平滑的线条,则插入的数据不正确。尝试将数据更改为简单数组,即您的数据应该像 [1,2,3,4,5...].
我正在使用 Echarts 构建折线图,我需要它是平滑的。我尝试了 smooth: true
或 smooth: 1.5
,但当图形包含大量数据时它无济于事。 2000条左右的数据如何处理?
这是我的代码:
option = {
xAxis: {
type: 'category',
},
yAxis: {
type: 'value'
},
series: [{
data: [["12",0],["23",1],["32",1],["40",2],["42",2],["72",3]...],
type: 'line',
smooth: true
}]
};
Brake Echarts graph
如果您需要得到平滑的线条,则插入的数据不正确。尝试将数据更改为简单数组,即您的数据应该像 [1,2,3,4,5...].