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 2021/02/04 14:29:27 UTC

[GitHub] [echarts-doc] Clarkkkk edited a comment on issue #164: Some features are not available in custom series

Clarkkkk edited a comment on issue #164:
URL: https://github.com/apache/echarts-doc/issues/164#issuecomment-773274259


   > > In this example, `fill` is fixed in `renderItem`. You can try another simpler example https://echarts.apache.org/examples/zh/editor.html?c=custom-cartesian-polygon
   > > `api.visual('color')` will pick color from `itemStyle` or color palette. We should mention it in the doc
   > 
   > So here is two conclusions:
   > 
   > 1. The color in `itemStyle` is covered by `fill` in `renderItem`, whether `fill` is specified or not.
   > 2. I need to use `api.visual()` in `renderItem` to reference the `itemStyle` config.
   > 
   > Am I right?
   > 
   > How about the other properties in `itemStyle`, like `shadowBlur` etc? I just looked up the [source code](https://github.com/apache/echarts/blob/master/src/chart/custom/install.ts) roughly. It seems that only `'color'` and `'borderColor'` is supported in `api.visual()`. Or is it better to use `style` in `renderItem` instead of `itemStyle`?
   
   Oh I discover that I can specify `style: api.style()` in `renderItem` to get other properties defined in `itemStyle`. Why is this deprecated, this is exactly what I need🤣. 
   
   As for the label, it is because I didn't get the styles correctly that I would consider that the `label` relavant properties are not available--The label is invisible without styles. Another fact that misleads me is that there is no `label` property in custom series doc. Now I discover that specifying `style: api.style()` also acts on labels, making styles defined in `series.label` take effect, which is also not documented.
   
   My misunderstanding of `selectMode` is similar--selected styles are not working. And I didn't find apis that reflect the `itemStyle` defined in `select` and `blur`. I suppose I need to change those styles dynamically in relavant events(correct me if I'm wrong).
   
   Anyway, my questions are solved generally. There is much work to do with the document though. If you don't have further comments, you can close this issue. Thanks for your patience!😀
   


----------------------------------------------------------------
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