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/06 05:29:26 UTC
[GitHub] [incubator-echarts] pissang commented on a change in pull request
#11548: fix(line): axis pointer highlights data outside of chart #11360
pissang commented on a change in pull request #11548: fix(line): axis pointer highlights data outside of chart #11360
URL: https://github.com/apache/incubator-echarts/pull/11548#discussion_r342922230
##########
File path: src/chart/line/LineView.js
##########
@@ -521,6 +522,10 @@ export default ChartView.extend({
// Null data
return;
}
+ // fix #11360: don't draw symbol if clip is true and symbol is outside the visible area
+ if (seriesModel.get('clip', true) && !this._clipShapeForSymbol.contain(pt[0], pt[1])) {
Review comment:
`this._clipShapeForSymbol` will be `undefined` if `seriesModel.get('clip', true)` is `false` or coordinateSystem didn't have `getArea` method. Check code https://github.com/apache/incubator-echarts/blob/master/src/chart/line/LineView.js#L357
So is it better to be written as
```js
if (this. _clipShapeForSymbol && !this._clipShapeForSymbol.contain(pt[0], pt[1])) {
```
----------------------------------------------------------------
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