KLineChart icon indicating copy to clipboard operation
KLineChart copied to clipboard

Layer annotations and associated drawExtend above the crosshair cursor

Open DeeeeLAN opened this issue 4 years ago • 5 comments
trafficstars

Hi, awesome work on the annotation feature, it is exactly what I was looking for. Is it possible to layer the annotations and their popups above the crosshair cursor? Currently when hovering,the crosshair is covering up some of the text. I see that the floating tooltip for the ohlc data is layered above the crosshairs, so I assume it is possible.

DeeeeLAN avatar Apr 30 '21 07:04 DeeeeLAN

Here is a screenshot of what I am talking about: image The bottom gray box is the annotation, the upper blue box is the associated drawExtend popup. With the crosshair cursor layering on top, it makes it hard to see the text.

DeeeeLAN avatar Oct 12 '21 18:10 DeeeeLAN

I'm thinking of a way to deal with hierarchical issues, do you have any good suggestions?

liihuu avatar Oct 14 '21 02:10 liihuu

Maybe this would be useful? https://stackoverflow.com/questions/9165766/html5-canvas-set-z-index

It looks like the best solution is usually to draw in the order you want it layered, but I am not sure if that is feasible in this situation or not.

DeeeeLAN avatar Oct 14 '21 02:10 DeeeeLAN

Yes, but this does not solve the problem completely.

liihuu avatar Oct 14 '21 02:10 liihuu

I am not super familiar with how canvas works. I assume you need to draw the crosshairs then draw the annotations? I can poke at the code and see if I can make it work as well.

DeeeeLAN avatar Oct 14 '21 02:10 DeeeeLAN