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

Regarding Update Graph

Open teraiyamayurcontact opened this issue 2 years ago • 4 comments

HIXAxis hixAxis = new HIXAxis();

i am working on Android sdk. when i update Xaxis and Yaxis second time according to filter data in app graph not getting update.

Thanks in advance

teraiyamayurcontact avatar Apr 11 '22 12:04 teraiyamayurcontact

Hi @teraiyamayurcontact ! Can you elaborate more on how you updte the chart exactly? You should always re asing options object with new data. Also, the axes in options are in the list (even if there's only one axis), so the whole list needs an update to reflect the change in the chart.

soommy12 avatar Apr 12 '22 08:04 soommy12

Thanks for your replay.

Once graph loaded then we are filter data and second time we have set new data in option and but its not get reflected.

hiChartTrend.redraw();
hiChartTrend.refreshDrawableState();
hiChartTrend.resetPivot();

i have tried above method for after select filter from dropdown data not getting update.

Thanks

teraiyamayurcontact avatar Apr 12 '22 08:04 teraiyamayurcontact

If you are setting new data I guess you're speaking of the new series set not the x-axis. If you have new series for your chart, you can use the setSeries(newArrayListOfSeries) method. That should refresh the chart (the redraw, reload, and so on are not needed). Also, if that won't work for any reason try to reassign the options object which contains a new data set (chartview.setOptions(newOptions)).

soommy12 avatar Apr 13 '22 09:04 soommy12

Thanks for your replay.

chartview.setOptions(newOptions) this one already done but not working setSeries(newArrayListOfSeries) let me try again with this.

teraiyamayurcontact avatar Apr 13 '22 09:04 teraiyamayurcontact

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

MikolajMichalczak avatar Apr 25 '24 11:04 MikolajMichalczak