highcharts-android
highcharts-android copied to clipboard
Highcharts inside RecyclerView or NestedScrollView causes laggy scroll
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
When the tooltip is visible on chart and user tries to scroll, then the lag is more evident and annoying.
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.
Hi @soommy12, How to disable chart focus ?
There is a method that every android view has for that purpose. You can use it also on your chart view: chartView.clearFocus()
Even of clearFocus(), sometimes tooltip is not getting dismissed
@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.
Closing due to inactivity. Please feel free to reopen the ticket if you have any further questions.