highcharts-android icon indicating copy to clipboard operation
highcharts-android copied to clipboard

Highcharts inside RecyclerView or NestedScrollView causes laggy scroll

Open pradeep-orbi opened this issue 2 years ago • 6 comments

When i place HIChartView inside NestedScrollView or RecyclerView and try to scroll up the page by touching on the graph, the recyclerview scroll movement is very laggy. This is happening only when i touch the chartview and try to scroll the page up. But the recyclerview scroll is smooth when i touch outside of the chartview and move the page up. Please help me in solving this issue

pradeep-orbi avatar Jun 29 '22 03:06 pradeep-orbi

When the tooltip is visible on chart and user tries to scroll, then the lag is more evident and annoying.

pradeep-orbi avatar Jul 02 '22 03:07 pradeep-orbi

Hi @pradeep-orbi , this is because Highcharts is a wrapper of the web library. The chart under the hood is drawn in WebView and when the WebView has focus it will cause laggy scrolling. You can try to disable chart focus in scrolling callback in either in recyclerview or nestedscrollview regarding what you're using at the moment.

soommy12 avatar Jul 04 '22 09:07 soommy12

Hi @soommy12, How to disable chart focus ?

pradeep-orbi avatar Jul 04 '22 11:07 pradeep-orbi

There is a method that every android view has for that purpose. You can use it also on your chart view: chartView.clearFocus()

soommy12 avatar Jul 08 '22 12:07 soommy12

Even of clearFocus(), sometimes tooltip is not getting dismissed

pradeep-orbi avatar Jul 17 '22 05:07 pradeep-orbi

@pradeep-orbi Can you please provide your code where the focus is cleared? Could be helpful, especially with the nested scrolling it may be tricky to clear the ViewHolder focus.

soommy12 avatar Jul 26 '22 11:07 soommy12

Closing due to inactivity. Please feel free to reopen the ticket if you have any further questions.

MikolajMichalczak avatar Apr 08 '24 08:04 MikolajMichalczak