c3js / c3js/c3

tooltip.position function never gets point as parameter

Open
#2,515 1 comment 5 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

C3 version: 0.6.8
D3 version: 5.7.0
Browser: Chrome 70.0.3538.77.
OS: MAC OS 10.13.6.

I'm trying to add a custom tooltip to a spline chart but I'm unable to calculate the position because the 'element' parameter of the function is always the 'c3-event-rect' and not the point that I'm hovering. I've tried to change the value of the 'grouped' option (as suggested here: https://github.com/c3js/c3/pull/833) but it doesn't change anything.

codepen:
https://codepen.io/antonvp/pen/PyrRBR

Please let me know if I'm doing something wrong.

The result I am looking for is something like this:

screen shot 2018-10-31 at 1 29 26 pm

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.