You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/11/08 13:23:39 UTC

[GitHub] momogugu edited a comment on issue #8885: 折线图label因为showSymbol属性设置为false显示不出来bug

momogugu edited a comment on issue #8885: 折线图label因为showSymbol属性设置为false显示不出来bug
URL: https://github.com/apache/incubator-echarts/issues/8885#issuecomment-436991660
 
 
   @shentao1 
   I checked the code, label is connected with symbol. If `showSymbol = false`, it won't draw label.
   And if you want to show label without symbol, you need to set `symbol: 'none'` instead of `showSymbol: false`.
   ![image](https://user-images.githubusercontent.com/20534564/48199693-e36df080-e397-11e8-9040-c36e8d24235a.png)
   However, when I set `symbol: 'none'`, it still doesn't draw label. 
   I checked the code again, and found a function `symbolNeedsDraw`.
   ![image](https://user-images.githubusercontent.com/20534564/48199840-54150d00-e398-11e8-9863-4dc303abb7c3.png)
   so when  `symbol: 'none'` , this function will return false, it won't draw symbol, neither label.
   I think maybe the developer doesn't want to show label without symbol, so I'm not sure whether it is a bug or not.
   And I tested, if the condition `data.getItemVisual(idx, 'symbol') !== 'none'` is  removed, we can draw the line chart like this.  
   ![image](https://user-images.githubusercontent.com/20534564/48199869-68590a00-e398-11e8-9282-35278709fde8.png)
   Hope it helps.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

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