Chart.js icon indicating copy to clipboard operation
Chart.js copied to clipboard

[BUG] Line chart tooltip is not fully visible when dataset count is too many

Open yusufozturk opened this issue 9 years ago • 4 comments

Expected Behavior

When a line chart has many datasets, all dataset elements should be visible on tooltip.

Current Behavior

Some part of tooltip is hidden under Chartjs area, not all datasets elements are visible.

image

Steps to Reproduce

  1. Open following codepen: https://codepen.io/yusufozturk/pen/oWwBaR
  2. See tooltips

Context

Our customers can monitor servers with 690 different performance counters on same chart with using Chartjs. If customer wants to see all servers on one chart, they are not able to see some of the datasets on tooltip.

Environment

  • Chart.js version: 2.5.0
  • Browser name and version: Chrome 58.0.3029.81

Production View

image

yusufozturk avatar May 02 '17 10:05 yusufozturk

Is this a duplicate of #1731? One solution is to use an HTML tooltip that doesn't draw on the canvas so that it's not affected by this kind of thing

etimberg avatar May 02 '17 11:05 etimberg

@etimberg I think it's same issue Evert. I can try this quickly. I think mentioning as HTML tooltip, do you mean following sample for custom tooltip? https://github.com/chartjs/Chart.js/blob/master/samples/tooltips/custom-line.html

yusufozturk avatar May 02 '17 11:05 yusufozturk

Hi Evert, Yes, it's solving the issue here. I updated my codepen if anyone search and find this in future: https://codepen.io/yusufozturk/pen/oWwBaR Thanks.

yusufozturk avatar May 02 '17 11:05 yusufozturk

Hi yusufozturk,

Great solution! But how do you prevent the tooltip from disappearing once you initiate a scroll down?

jgverzosa avatar Jul 12 '17 06:07 jgverzosa