You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/05/23 11:45:57 UTC

[GitHub] [incubator-echarts] alex2wong commented on issue #12479: 当series存在多个飞线图时,不同lines下effect中的trailLength(尾迹长度)会互相影响

alex2wong commented on issue #12479:
URL: https://github.com/apache/incubator-echarts/issues/12479#issuecomment-633034566


   修改配置即可: https://gallery.echartsjs.com/editor.html?c=xK85XdQJZO&v=3 
   参考文档:https://echarts.apache.org/zh/option.html#series-lines.effect
   所有带有尾迹特效的图表需要单独放在一个层,也就是需要单独设置 zlevel。当然如果不同的 trailLength Effect lines 系列,需要设置不同的 zlevel,以方便 canvas 去做不同的 trailLength 渲染。
   
   ```
   {
               type:"lines",
               coordinateSystem: "cartesian2d",
               lineStyle:{
                 width:0
               },
               zlevel:3,   // 与第一个 Effect 系列不同的 zlevel 即可
               effect:{
                 show:true,
                 symbol:"circle",
                 symbolSize:4,
                 color:"#23E0FF",
                 trailLength:0.4
               },
               data:[
                 {name:"lyxtLine1",coords:[[73,48],[73,75]]},
                 {name:"lyxtLine2",coords:[[75,38],[75,65]]},
                 {name:"lyxtLine3",coords:[[95,23],[95,50]]},
                 {name:"lyxtLine4",coords:[[135,35],[135,75]]},
                 {name:"lyxtLine5",coords:[[120,55],[120,83]]},
                 {name:"lyxtLine6",coords:[[142,45],[142,65]]},
               ]
             }
   ```
   具体源代码参考:
   https://github.com/apache/incubator-echarts/blob/master/src/chart/lines/LinesView.js#L67


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org