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 2019/11/20 19:57:46 UTC
[GitHub] [incubator-echarts] 100pah commented on a change in pull request
#11547: fix(legend): fix highlight state after inverseselect #11480
100pah commented on a change in pull request #11547: fix(legend): fix highlight state after inverseselect #11480
URL: https://github.com/apache/incubator-echarts/pull/11547#discussion_r348715374
##########
File path: src/component/legend/LegendView.js
##########
@@ -518,11 +518,15 @@ function setSymbolStyle(symbol, symbolType, legendModelItemStyle, borderColor, i
return symbol.setStyle(itemStyle);
}
-function dispatchSelectAction(name, api) {
+function dispatchSelectAction(name, dataName, api, excludeSeriesId) {
+ // downplay before unselect
+ dispatchDownplayAction(name, dataName, api, excludeSeriesId);
api.dispatchAction({
type: 'legendToggleSelect',
name: name
});
+ // highlight after select
+ dispatchHighlightAction(name, dataName, api, excludeSeriesId);
Review comment:
This highlight action probably is not needed.
Otherwise if we call
```js
chart.dispatchAction({
type: 'legendToggleSelect',
name: 'b'
});
```
manually, there are still unexpected highlight state.
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org