FusionCharts API-Methods: dispose
Created using FusionCharts Suite XT - www.fusioncharts.com
by FusionCharts
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
<script src="https://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="https://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
<!-- This sample shows the usage of the dispose() method -->
<div id="indicatorDiv">Method Name: <strong>dispose()</strong>
<p>Disposes a chart completely, when called on an instance of FusionCharts. This clears the entire chart object and removes it from the DOM tree structure. When the chart is successfully disposed, <strong>chartInstance.disposed</strong> is set to <strong>true</strong>.</p>
<p>For the bubble chart below, click the <strong>Dispose chart</strong> button to dispose the chart.</p>
<div class="text-center">
<button id="dispose">Dispose chart</button>
<label id="label"><strong>Chart disposal status:</strong> <span id="state"></span> </label>
<div id="chart-container">FusionCharts will render here</div>
</div>
</div>
CSS
body {
padding: 5px;
margin: 0 auto;
}
strong{
font-weight: bold;
}
.text-center {
text-align: center;
}
p {
margin: 10px auto;
}
.mb-20 {
margin-bottom: 20px;
}
#indicatorDiv {
width: 500px;
font-family:'Arial', 'Helvetica';
font-size: 13px;
}
#dispose {
font-size: 13px;
padding: 10px;
margin: 10px;
}
#label {
font-family:'Arial', 'Helvetica';
font-size: 16px;
display: block;
margin: 10px;
}
#state {
color: #ff0000;
}
JavaScript
FusionCharts.ready(function () {
var conversionChart = new FusionCharts({
type: 'bubble',
renderAt: 'chart-container',
width: '490',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Sales Analysis of Shoe Brands",
"subcaption": "Last Quarter",
"xAxisMinValue": "0",
"xAxisMaxValue": "100",
"yAxisMinValue": "0",
"yAxisMaxValue": "30000",
"plotFillAlpha": "70",
"plotFillHoverColor": "#6baa01",
"showPlotBorder": "0",
"xAxisName": "Average Price",
"yAxisName": "Units Sold",
"numDivlines": "2",
"showValues": "1",
"showTrendlineLabels": "0",
"plotTooltext": "$name : Profit Contribution - $zvalue%",
"drawQuadrant": "1",
"quadrantLineAlpha": "80",
"quadrantLineThickness": "3",
"quadrantXVal": "50",
"quadrantYVal": "15000",
//Quadrant Labels
"quadrantLabelTL": "Low Price / High Sale",
"quadrantLabelTR": "High Price / High Sale",
"quadrantLabelBL": "Low Price / Low Sale",
"quadrantLabelBR": "High Price / Low Sale",
//Cosmetics
"baseFontColor": "#333333",
"baseFont": "Helvetica Neue,Arial",
"captionFontSize": "13",
"subcaptionFontSize": "12",
"subcaptionFontBold": "0",
"showBorder": "0",
"bgColor": "#ffffff",
"showShadow": "0",
"canvasBgColor": "#ffffff",
"canvasBorderAlpha": "0",
...