Skip to content

Tooltip enabledOnSeries does not work #697

@thijscrombeen

Description

@thijscrombeen

Codepen

https://codepen.io/anon/pen/OeWVVJ

Explanation

The enabledOnSeries on the tooltip does not work. When setting the array to the index of one of the series it won't show any of them.

I took a quick look at the code and believe the following is the issue.

var index = parseInt(opt.paths.getAttribute('index')); if (this.tConfig.enabledOnSeries.indexOf(index) < 0) { self.handleMouseOut(opt); return; }

The index results in NaN. The opt.paths property results in the entire graph and not in the path of the stroke where the index attribute is on. I'm able to get the index using below snippet and then it does work:

var index = self.tooltipUtil.getNearestValues({ context: self, hoverArea: opt.hoverArea, elGrid: opt.elGrid, clientX: clientX, clientY: clientY, hasBars: self.hasBars }).capturedSeries;

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions