我想在我的一个项目中使用echarts。当我加载大约1.000.000个数据点时,我的图表变得非常慢。我知道echarts-gl提供了webGL支持,但是我找不到任何关于如何使用它的文档,比如折线图-- 'lineGL‘不起作用。
有谁知道如何在apache echarts中将webGL与折线图结合使用?
发布于 2021-09-16 05:13:27
我自己也在研究这一点,但没有webgl的性能,我强烈建议使用sampling
和large
系列来提高性能。
Settings Symbols = "none"
还极大地提高了性能。
示例:
{
animation: false,
xAxis: {
type: 'time',
silent: false,
splitLine: {
show: false
},
splitArea: {
show: false
}
},
yAxis: {
type: 'value',
splitArea: {
show: false
}
},
dataZoom: [
{
type: 'slider',
show: true,
xAxisIndex: [0],
},
{
type: 'inside',
xAxisIndex: [0],
},
],
tooltip:{
trigger: "axis",
axisPointer: {
type: 'shadow'
},
},
series: [{
type: 'line',
data: randomPoints(500000, 0),
sampling: 'average',
large: true,
showSymbol: false,
lineStyle:{
width:1.25,
},
animation: false,
emphasis:{
lineStyle:{
width:1.25
}
},
silent: true,
},
{
type: 'line',
data: randomPoints(500000, -200000),
sampling: 'average',
large: true,
showSymbol: false,
lineStyle:{
width:1.25,
},
animation: false,
silent: true,
emphasis:{
lineStyle:{
width:1.25
},
}
}
https://stackoverflow.com/questions/69120961
复制相似问题