Why does echarts, set loop to false, to prevent the special effects from looping indefinitely? when the data is requested again, the data is not rendered, and why?
the following is the code to create the echarts instance and periodically request the ajax;, so when I set the loop, special effect in the created instance not to loop, but when the timing request for the second time, the data comes, it does not appear on the map, ask which old friend to answer! When the data is supposed to come, it needs to be re-rendered. Solve
bmap: {
// center: [position.x,position.y],
// zoom:17,
roam: true,
mapStyle: {
"styleJson": [{
"featureType": "water",
"elementType": "all",
"stylers": {
"color": "-sharp031628"
}
},
{
"featureType": "land",
"elementType": "geometry",
"stylers": {
"color": "-sharp000102"
}
},
{
"featureType": "highway",
"elementType": "all",
"stylers": {
"visibility": "off"
}
},
{
"featureType": "arterial",
"elementType": "geometry.fill",
"stylers": {
"color": "-sharp000000"
}
},
{
"featureType": "arterial",
"elementType": "geometry.stroke",
"stylers": {
"color": "-sharp0b3d51"
}
},
{
"featureType": "local",
"elementType": "geometry",
"stylers": {
"color": "-sharp000000"
}
},
{
"featureType": "railway",
"elementType": "geometry.fill",
"stylers": {
"color": "-sharp000000"
}
},
{
"featureType": "railway",
"elementType": "geometry.stroke",
"stylers": {
"color": "-sharp08304b"
}
},
{
"featureType": "subway",
"elementType": "geometry",
"stylers": {
"lightness": -70
}
},
{
"featureType": "building",
"elementType": "geometry.fill",
"stylers": {
"color": "-sharp000000"
}
},
{
"featureType": "all",
"elementType": "labels.text.fill",
"stylers": {
"color": "-sharp857f7f"
}
},
{
"featureType": "all",
"elementType": "labels.text.stroke",
"stylers": {
"color": "-sharp000000"
}
},
{
"featureType": "building",
"elementType": "geometry",
"stylers": {
"color": "-sharp022338"
}
},
{
"featureType": "green",
"elementType": "geometry",
"stylers": {
"color": "-sharp062032"
}
},
{
"featureType": "boundary",
"elementType": "all",
"stylers": {
"color": "-sharp465b6c"
}
},
{
"featureType": "manmade",
"elementType": "all",
"stylers": {
"color": "-sharp022338"
}
},
{
"featureType": "label",
"elementType": "all",
"stylers": {
"visibility": "off"
}
}
]
}
},
series: [{
type: "lines",
coordinateSystem: "bmap",
polyline: true,
data: busLines,
silent: true,
lineStyle: {
normal: {
// color: "-sharpc23531",
// color: "rgb(200, 35, 45)",
opacity: 0.2,
width: 1
}
},
progressiveThreshold: 500,
progressive: 200 //
}, {
type: "lines",
coordinateSystem: "bmap",
polyline: true,
data: busLines,
lineStyle: {
normal: {
width: 0
}
},
effect: { //
constantSpeed: 2, //
// period:5,//
show: true,
// loop: false, //
trailLength: 0.6, //
symbolSize: 1.5 //
},
zlevel: 1
}]
};
if(centerFirst){
option.bmap.center=[position.x,position.y]
option.bmap.zoom=15
centerFirst=false;
}
console.log(option.series[1].effect.constantSpeed);
mapEcharts.setOption(option);
-sharp-sharp-sharp -sharp-sharp-sharp
the environmental background of the problems and what methods you have tried
related codes
/ / Please paste the code text below (do not replace the code with pictures)