You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the amCharts XYChart does not allow the page to continue scrolling when the inner scroll reaches its limit.
I'm not sure if that is a bug or a feature.
The desired behavior is to ensure that the page continues scrolling when the inner scroll of the XYChart reaches its limit.
Would that be possible?
Steps to Reproduce
Create page which document generates a scroll bar, for example 3000px tall
Create an XYChart with horizontal and-or vertical scrollbars.
Scroll the chart to its limit using the mouse wheel.
Observe that the page does not continue scrolling when the inner scroll reaches its limit.
Relevant Code
The relevant code can be found in src/.internal/charts/xy/XYChart.ts, specifically lines 626-701.
The handleWheel method needs to be modified to detect when the inner scroll is over and allow the page to continue scrolling.
Additional Context
To detect when the inner scroll is over, the rangechanged event of the Scrollbar can be used.
This event is triggered whenever the scroll range changes.
The start and end properties of the Scrollbar can be checked to determine if the scroll is at the beginning or end of the range.
Implement logic to handle the scroll behavior when the inner scroll is over.
I believe that the following lines should be run conditionally
Description
Currently, the amCharts XYChart does not allow the page to continue scrolling when the inner scroll reaches its limit.
I'm not sure if that is a bug or a feature.
The desired behavior is to ensure that the page continues scrolling when the inner scroll of the XYChart reaches its limit.
Would that be possible?
Steps to Reproduce
Relevant Code
The relevant code can be found in
src/.internal/charts/xy/XYChart.ts
, specifically lines 626-701.The
handleWheel
method needs to be modified to detect when the inner scroll is over and allow the page to continue scrolling.Additional Context
To detect when the inner scroll is over, the
rangechanged
event of theScrollbar
can be used.This event is triggered whenever the scroll range changes.
The
start
andend
properties of theScrollbar
can be checked to determine if the scroll is at the beginning or end of the range.Implement logic to handle the scroll behavior when the inner scroll is over.
I believe that the following lines should be run conditionally
amcharts5/src/.internal/charts/xy/XYChart.ts
Lines 510 to 517 in c32fbe3
Perhaps they should only be applied in those situations:
amcharts5/src/.internal/charts/xy/XYChart.ts
Lines 577 to 700 in c32fbe3
But I'm not sure if that's the right way to do it.
Considerations
Control + scroll is not what is needed.
Listening for "wheel" events on xyChart.plotContainer is possible,
Checking if the inner scroll has reached its limit can be done.
However, setting "wheelX" back to "none" does not resolve the issue of the event trap.
The text was updated successfully, but these errors were encountered: