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

Single points are very difficult to see

Open tannerlinsley opened this issue 10 years ago • 9 comments

screen shot 2016-04-16 at 10 36 53 pm

I'm wondering if the point should be drawn in the center of the axis. And since there is no line, it would be cool if we could have single points have some kind of line to denote they're there. In our app we use a very small point radius and rely on the line for most visibility. What should we do?

tannerlinsley avatar Apr 17 '16 03:04 tannerlinsley

Some options I can think of

  1. Offset the line to the center
  2. Vertical annotation line (we would need to build annotations for this).
  3. Figure out a better way to handle zoom / pan (current way does it by clipping outside the chart area) which is why half the point is cut off.

etimberg avatar Apr 17 '16 11:04 etimberg

I'm also dealing with this issue since upgrading, previous versions showed the node on top of the baseline. Now they appear cutoff.

image

DarrenGalway avatar Apr 19 '16 23:04 DarrenGalway

Is there a solution? This is kind of a game changer; thinking of falling back to v1.

FreelanceWebNinja avatar May 24 '16 23:05 FreelanceWebNinja

@FreelanceWebNinja remove this stuff and it goes away https://github.com/chartjs/Chart.js/blob/master/src/core/core.controller.js#L327-L330

etimberg avatar May 24 '16 23:05 etimberg

Remove the highlighted lines?

FreelanceWebNinja avatar May 25 '16 00:05 FreelanceWebNinja

Ha, never mind I gotcha. Thank you!

FreelanceWebNinja avatar May 25 '16 00:05 FreelanceWebNinja

great. i'm trying to think of a good solution to support this. The problem is that the points need to be projected onto the rectangle to make a path and then clip that. Doing that in a performant manner is difficult.

etimberg avatar May 25 '16 00:05 etimberg

It would be good to be able to map the points above the axes (layered).

At the very least, a "zoom/pinch" flag option should be available to strip that code rather than having to do it manually.

FreelanceWebNinja avatar May 25 '16 01:05 FreelanceWebNinja

Related: http://stackoverflow.com/questions/42698710/chartjs-how-to-display-line-chart-with-single-element-as-a-line-not-as-a-dot

marsitatheultra avatar Mar 09 '17 15:03 marsitatheultra