Unable to clear the 3d chart items after redrawing in RGraph

105 Views Asked by At

I am using RGraph.net to draw 3d charts in our angular 7 application. i have to draw a 3d column chart based on user actions(like click event). when user selected 5 i can draw the chart and it has 3 items with .rgraph_accessible_text_xaxis_labels class. after user again selected 9 so i can redraw existing chart with new data. but first 3d chart data still exist you can check in images. In first image only 3 items(check Browser console in image1) are there but after redraw the chart 12 items(check browser console in image2) are there but it should 9 items.

ISSUE: I am unable to clear the previous items in 3d chart after redrawing the chart with new data enter image description here

enter image description here

1

There are 1 best solutions below

1
Santhosh On
let canvas = (document.getElementById('cvs2'));
RGraph.reset(canvas2);