We use the Anychart ganttResource. We noticed that when the horizontal scrollbar is enabled and there is enough data to fill vertically, the last row is not too visible and clickable because the scrollbar comes over it. Reproducable in almost every example on the anychart website using ResourceGantt. Just make your window smaller in height and you will see the scrollbar coming on top of the last line. This however was unsuspected and unwanted behaviour. Is there a way to force the scrollbar to always be underneath the last content line instead on top of it? Because we have a lot of click actions registered and it is nearly impossible to get them clicked correct due to the scrollbar. Thanks in advance, and if you need any more details or assistance then please let me know.
Asked
Active
Viewed 215 times
1 Answers
1
You can increase the row height to make sure that the horizontal scroller doesn't overlap the last row entirely. You can achieve that like this:
chart.defaultRowHeight(50);

AnyChart Support
- 3,770
- 1
- 10
- 16
-
1This is not a solution for us. We have already chosen our defaultHeight and business is unwilling to change this. Unless I can change the height only for the last element this might be a solution. – gogessj4 Oct 03 '18 at 14:43
-
Yes, you can define the custom height for the last row manually from the data. For details, please, check the following sample (line 44) - https://playground.anychart.com/ZQnNj1H1 – AnyChart Support Oct 04 '18 at 02:41
-
1We had a look at this solution. But the business found this solution unsufficient. We are now using a dummy line to add at the bottom so the last line doesn't contain data. But I was trying to get this dummy line in only when BOTH scrolls are active. But in whatever state the scrollbar's are, the enabled() function on the scrollbars always returns true, even when not visible.... Is there another way to check if the scrollbars are active or not? Because my guess is that the enabled() does not signify shown or not shown but possible to be shown or not? – gogessj4 Oct 04 '18 at 12:53
-
if enabled() getter returns truth it tells that the scroller is allowed to appear if it's required. It doesn't tell is it visible or not. The scroller is visible when the chart doesn't fit the current bounds of the container. You can check it using the following approach (decrease the height of the container to let the vertical scroller appears) - https://playground.anychart.com/Iln9wA1T – AnyChart Support Oct 05 '18 at 03:42
-
1Thanks for this approach. This works fine to know when the vertical scroll is enabled. But i should also know when the horizontal scroll is enabled. How Can I check this? Is there an option to see if the data fits the available timeframe on the timeline? – gogessj4 Oct 08 '18 at 08:21
-
Yes! The idea is pretty simple and works perfectly. For details, please, check the following sample - https://playground.anychart.com/rfBwVPnv/1 – AnyChart Support Oct 10 '18 at 03:12