You need to clear the ObjectRegistry that tracks the objects. You can do it with:
RGraph.ObjectRegistry.Clear();
Or you can clear the objects associated with a particular canvas tag with:
RGraph.ObjectRegistry.Clear(myCanvas);
Or you can delete a specific object with:
RGraph.ObjectRegistry.Remove(myObject);
You can read more about ObjectRegistry in the API documentation page:
https://www.rgraph.net/canvas/docs/api.html#objectregistry
source share