This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[GUI Composer] How to clear graph data?

I'm using a scatter plot and using the following functions to feed it data:

dijit.byId('widget_73')._setSeriesN(dac_array_x, 0, true);
dijit.byId('widget_73')._setSeriesN(dac_array_y, 0, false);	

This works fine. But when I want to clear the series altogether, I am unable to do so. I've tried feeding it empty arrays, but this doesn't do anything. The graph just keeps its old data.

I'd like to either clear the series (in this case series 0) or momentarily disable it from being shown (while series 1 is still shown).

  • There is a property in the graph to show/hide a series. It is currently not supported as a public API by GUI Composer, but javascript does nothing to prevent you from using this property.

    i.e

    var g = dijit.byId('widget_73')._graph;
    g.series[0].show = false;
    g.redraw();

    Regards,
    Patrick