-
Notifications
You must be signed in to change notification settings - Fork 19.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For Map Application, update the scatter data will erase all the lines data #9212
Comments
Try put the unchanged part into a series with different |
@Ovilia Hi Ovilia, I have tested using different zlevels, but it does not work in this situation. I even give each series different zlevel but the lines will still disappear while the scatters left there. |
This issue may be relevant to #9202 |
@Ovilia Any updates on this? |
@mzy2240 Hi, sorry for the late reply. I didn't understand your question yet. You may put the code at http://gallery.echartsjs.com and only paste the highlighted code here. |
Hi Ovilia, for some reason I cannot use the gallery.echartsjs.com to reproduce the case, however, you can use the official example http://echarts.baidu.com/examples/editor.html?c=map-polygon and copy/paste the following code to replace the original codes from line 433 to the end. Here are what you should expect: a wide line on the map from 拉萨 to 大庆. If you can see that, then uncomment the last 7 lines of code, which is supposed to only update the scatter data, you will notice that the line disappears, which does not make sense to me. Scatters and lines have been placed on different z-level, but it has no effect on the line's disappear. Hopefully this time I make it clear enough. Thanks! @Ovilia @100pah myChart.setOption({
title: {
text: '全国主要城市空气质量',
subtext: 'data from PM25.in',
sublink: 'http://www.pm25.in',
left: 'center',
textStyle: {
color: '#fff'
}
},
tooltip: {
trigger: 'item'
},
bmap: {
center: [104.114129, 37.550339],
zoom: 5,
roam: true
},
series: [{
id: 'scatter',
name: 'pm2.5',
type: 'scatter',
zlevel: 0,
coordinateSystem: 'bmap',
data: [], //convertData(data),
symbolSize: function(val) {
return val[2] / 10;
},
label: {
normal: {
formatter: '{b}',
position: 'right',
show: false
},
emphasis: {
show: true
}
},
itemStyle: {
normal: {
color: '#ddb926'
}
}
},
{
name: 'Top 5',
type: 'effectScatter',
coordinateSystem: 'bmap',
data: convertData(data.sort(function(a, b) {
return b.value - a.value;
}).slice(0, 6)),
symbolSize: function(val) {
return val[2] / 10;
},
showEffectOn: 'emphasis',
rippleEffect: {
brushType: 'stroke'
},
hoverAnimation: true,
label: {
normal: {
formatter: '{b}',
position: 'right',
show: true
}
},
itemStyle: {
normal: {
color: '#f4e925',
shadowBlur: 10,
shadowColor: '#333'
}
},
zlevel: 1
},
{
type: 'custom',
coordinateSystem: 'bmap',
zlevel: 0,
renderItem: renderItem,
itemStyle: {
normal: {
opacity: 0.5
}
},
animation: false,
silent: true,
data: [0],
z: -10
},
{
name: 'lines',
type: 'lines',
coordinateSystem: 'bmap',
zlevel: 2,
data: [{
name: 'test',
coords: [
[91.11, 29.97],
[125.03, 46.58]
]
}],
lineStyle: {
normal: {
color: '#000000',
width: 5,
}
}
}
]
});
// myChart.setOption({
// series: [{
// id: 'scatter',
// name: 'pm2.5',
// data: convertData(data)
// }]
// }); |
OK. Reproduced. I'll check out why later. |
Thanks! Any updates on this? |
@Ovilia Any updates so far? |
I have the same issue. |
@Pysics It seems that they are not very active on fixing this bug. I have moved to Supermap for better performance. |
@Ovilia Howdy, any updates on this issue? |
Sorry for the very late fixing. I made a PR(#12850) for this about three weeks ago, which may probably fix the issue you reported. |
One-line summary [问题简述]
For Map Application, update the scatter data will erase all the lines data
Version & Environment [版本及环境]
Expected behaviour [期望结果]
Update part of the scatter data will not affect the rendered lines.
ECharts option [ECharts配置项]
Other comments [其他信息]
If need, you can use bmap and you will meet the same issue. For example, if you first render the first two series by giving them data and setOption, and then update the data to any of the last two series by setoption({series: [{
id: 'shunt',
name: 'shunt',
data: [{
name: 'blah',
value: [-86, 40] //for example
}]
}]})
then you will find the scatter in series 0 still there but the lines in series 1 disapper. Need help to fix this bug! Thanks!!!
The text was updated successfully, but these errors were encountered: