FusionCharts API-Methods: hasRendered

Created using FusionCharts Suite XT - www.fusioncharts.com

by FusionCharts

HTML

<script src="https://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="https://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- This sample shows the usage of the hasRendered() method -->
<div id="indicatorDiv">Method Name: <strong>hasRendered()</strong>
   <p>Returns true if the chart has rendered successfully, false if it has not.</p>
   <p>Click <strong>Render</strong> to render the chart. Once the chart has rendered, the <strong>Status</strong> message is updated.</p>

   <div class="text-center mb-20">
   	 <button id="render" class="mb-20">Render</button>   
   	   
   	<div id="status" class="mb-20"><strong>Status: </strong><span id="render_status"></span></div>
   </div>
    
    <div id="chart-container">FusionCharts will render here</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;
}
#render {
    height: 25px;
    font-size: 13px;
}
#status {
    font-family:'Arial', 'Helvetica';
    font-size: 13px;
}
#chart-container {
    font-family:'Arial', 'Helvetica';
    font-size: 13px;
}

JavaScript

FusionCharts.ready(function () {
    var visitChart = new FusionCharts({
        type: 'msline',
        renderAt: 'chart-container',
        width: '450',
        height: '350',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Number of visitors last week",
                    "subCaption": "Bakersfield Central vs Los Angeles Topanga",
                    "theme": "fint",
                    "captionFontSize": "13",
                    "subCaptionFontSize": "12",
                    "showValues": "0"
            },
                "categories": [{
                "category": [{
                    "label": "Mon"
                }, {
                    "label": "Tue"
                }, {
                    "label": "Wed"
                }, {
                    "vline": "true",
                        "lineposition": "0",
                        "color": "#6baa01",
                        "labelHAlign": "center",
                        "labelPosition": "0",
                        "label": "National holiday",
                        "dashed": "1"
                }, {
                    "label": "Thu"
                }, {
                    "label": "Fri"
                }, {
                    "label": "Sat"
                }, {
                    "label": "Sun"
                }]
            }],
                "dataset": [{
                "seriesname": "Bakersfield Central",
                    "data": [{
                    "value": "15123"
                }, {
                    "value": "14233"
                }, {
                    "value": "25507"
                }, {
                    "value": "9110"
                }, {
                    "value": "15529"
                }, {
                    "value": "20803"
                }, {
                    "value": "19202"
                }]
            }, {
                "seriesname": "Los Angeles Topanga",
                    "data": [{
  ...