pfc4ever
Posts: 17
Joined: Tue Mar 23, 2021 7:31 pm

Chart bars cropped while dragging if their start point is behind selected date

Hi guys, i have a problem with dragging elements which width is not fully visible ( their start time is before selected time on chart ). Solution for this is to allow live redraw on drag and drop but i have performance issue in that case since i am showing a lot of data on particular chart.

Image

On the picture u can see that start time of the dragged element is way behind selected time span but the dragged element width is much more narrow than it should be.

Do you guys know any solution for this ?
Thanks in advance for your answer
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: Chart bars cropped while dragging if their start point is behind selected date

Hi! Thanks for contacting us with your question! Could you reproduce your issue in some online editor? It is hard, to find the solution without looking into the code. Thanks! Kind regards,
Paweł Lysy
Highcharts Developer
pfc4ever
Posts: 17
Joined: Tue Mar 23, 2021 7:31 pm

Re: Chart bars cropped while dragging if their start point is behind selected date

Hi pawelys, thanks for ur unswer.

Here is jsfiddle example.
https://jsfiddle.net/p0ngsvmw/

You can see that when u drag chart bar with name 'Example chart bar', guide box for that bar is much smaller than exact size of the bar.
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: Chart bars cropped while dragging if their start point is behind selected date

There is no bar with the name: 'Example chart bar' in this example. Could you please double check the demo, you shared?
Paweł Lysy
Highcharts Developer
pfc4ever
Posts: 17
Joined: Tue Mar 23, 2021 7:31 pm

Re: Chart bars cropped while dragging if their start point is behind selected date

Sry about that, i probably forgot to save the change... Everything should be ok now.

https://jsfiddle.net/or49adnf/
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: Chart bars cropped while dragging if their start point is behind selected date

Sorry, unfortunately, I don't clearly see any performance issues with the given chart. Could you try to modify the demo, to make the problem more visible, or share exact reproduction steps, so I can investigate the issue better?
Kind regards,
Paweł Lysy
Highcharts Developer
pfc4ever
Posts: 17
Joined: Tue Mar 23, 2021 7:31 pm

Re: Chart bars cropped while dragging if their start point is behind selected date

It is not about performance issues, it is about dragged chart bar guide box size not being correct.

Use case : I am dragging example chart bar to the right, guide box is surrounded with red edges ( first image ) and its size doesn't represent real bar size which u can clearly see on the second image ( image was made after dragg event is finished ).

Image

Image

This is causing following problem:

I want to move first bar on the spot between second and third bar. Guide box is showing the size as it is visible bar size on the image so user think that bar can fit the spot. Because chart bar is much bigger (e.g. first bar actual size on the last image ) than the guide box shadow user actually dont know that first bar cant fit the spot untill he drops the bar on the desired position. It can make confusion for users.

Image
pawelys
Posts: 962
Joined: Wed Sep 02, 2020 10:37 am

Re: Chart bars cropped while dragging if their start point is behind selected date

Hello again! After investigation, it seems to be a bug. I already reported it as an issue on our official highcharts GitHub. Here is the link to the thread, that you can follow, where potential workaround or fix will be posted: https://github.com/highcharts/highcharts/issues/15636
In case of any further questions feel free to contact us again!
Kind regards,
Paweł Lysy
Highcharts Developer

Return to “Highcharts Usage”