Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

How do you delete a graph? #125

Open
btipling opened this Issue · 2 comments

2 participants

@btipling

I don't see anyway to use JavaScript to remove a graph and all the axis and what not. I just see ways to create graphs.

@vhmth

I created a clearGraph function that's laid out as follows:

function clearGraph() {
  $('#legend').empty();
  $('#chart_container').html(
    '<div id="chart"></div><div id="timeline"></div><div id="slider"></div>'
  );
}

That is, of course, if your legend is in a div with an id of 'legend' and your chart stuff is in a div with an id of 'chart_container' (like in the live data timeseries example on their site).

Hope that helped.

@vhmth

Also remember that this will clear the ENTIRE graph (including its template), not just the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.