This example shows how to destroy a webchart and it's associated controls using the chart.destroy
method introduced in v1.7. The example was created using webcharts and builds upon this example
xxxxxxxxxx
<html lang="en">
<title>Webcharts - Countdown to destroy a chart with controls</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="https://rawgit.com/RhoInc/Webcharts/master/css/webcharts.css">
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src='https://cdn.jsdelivr.net/gh/rhoinc/webcharts/build/webcharts.js'></script>
</head>
<body style="padding:1em;">
<h3 class="message"></h3>
<div class="chart"></div>
</body>
<script src="selfDestruct.js" defer></script>
</html>
Modified http://d3js.org/d3.v3.min.js to a secure url
Updated missing url https://rawgit.com/RhoInc/Webcharts/master/build/webcharts.js to https://cdn.jsdelivr.net/gh/rhoinc/webcharts/build/webcharts.js
https://d3js.org/d3.v3.min.js
https://rawgit.com/RhoInc/Webcharts/master/build/webcharts.js