You are viewing a plain text version of this content. The canonical link for it is here.
Posted to devnull@infra.apache.org by "hon2a (GitHub)" <gi...@apache.org> on 2018/08/24 07:22:24 UTC

[GitHub] [incubator-echarts] hon2a opened issue #8941: Emphasis styling is not properly documented for custom series

### 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
      }
    },
    // ...
  }]
}
```


[ Full content available at: https://github.com/apache/incubator-echarts/issues/8941 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org

[GitHub] [incubator-echarts] Ovilia commented on issue #8941: Emphasis styling is not properly documented for custom series

Posted by "Ovilia (GitHub)" <gi...@apache.org>.
The link to `series.itemStyle.emphasis` in [styleEmphasis](https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.renderItem.arguments.api.styleEmphasis) is wrong. It's `https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.itemStyle.emphasis` now, but should be `https://ecomfe.github.io/echarts-doc/public/en/option.html#series-custom.emphasis.itemStyle`. @100pah 

[ Full content available at: https://github.com/apache/incubator-echarts/issues/8941 ]
This message was relayed via gitbox.apache.org for devnull@infra.apache.org