c3js / c3js/c3

Chart tooltip can hide hovered points near right edge

Open
#2,754 0 comments 0 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.7.9
* **D3 version**: 5.12.0
* **Browser**: Chrome 80.0.3987.106
* **OS**: macOS Catalina 10.15.3

The tooltip position function checks if it's right edge would be past the right edge of the chart and moves it back to the left so that it stays aligned with the right edge
https://github.com/c3js/c3/blob/f339e290a7ddd73221e9ffe01cba6356951e22d7/src/tooltip.js#L200-L203

Current Behavior:
![before](https://user-images.githubusercontent.com/12093492/74572912-7c010200-4f45-11ea-924b-5fd07b3afff7.gif)
Without hiding hovered datapoints:
![after](https://user-images.githubusercontent.com/12093492/74572911-7b686b80-4f45-11ea-875c-06f24e3d7e07.gif)

[Possible implementation from yahoo/navi](https://github.com/yahoo/navi/blob/a00d8a2d546999f345055c8775d0d8ead5db4c9a/packages/core/addon/initializers/inject-c3-enhancements.js#L182-L223)

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.