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/08/24 07:22:24 UTC

[GitHub] hon2a opened a new issue #8941: Emphasis styling is not properly documented for custom series

hon2a opened a new issue #8941: Emphasis styling is not properly documented for custom series
URL: https://github.com/apache/incubator-echarts/issues/8941
 
 
   ### Documentation for custom series `renderItem` is missing any mention of how to apply styling set in `series[i].emphasis`.
   
   All examples in the documentation show application of `style: api.style()` in `renderItem`, but that doesn't do anything about `emphasis`. After catching the `api` in runtime and examining its contract, I found that it also provides a `styleEmphasis` method and that I can set the returned object's `styleEmphasis` to control its emphasis styling.
   
   ### Version & Environment [版本及环境]
   
   _Irrelevant._
   
   ### Expected behaviour [期望结果]
   
   Documentation for custom series' `renderItem` should clearly describe how to apply emphasis styling.
   
   ### ECharts option
   
   ```javascript
   option = {
     // ...
     series: [{
       type: 'custom',
       itemStyle: {
         color: 'red'
       },
       emphasis: {
         itemStyle: {
           color: 'cyan'
         }
       },
       renderItem(params, api) {
         // ...
         return {
           // ...,
           style: api.style(), // the documentation shows this ...
           styleEmphasis: api.styleEmphasis() // ... but never mentions this
         }
       },
       // ...
     }]
   }
   ```
   

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