FusionCharts API-Event: dataLoaded

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/fusioncharts.charts.js"></script>
<!-- This sample shows the event parameters, and their values, when dataLoaded event is triggered-->
<div id="indicatorDiv">Event name: <strong> dataLoaded </strong>
  
  <p>Triggered when the data for a chart (passed by url or as a string) is loaded to the chart object.</p>
  <p>When the dataLoaded event is triggered, it provides the <strong> eventObj </strong> object (object containing information generic to all events) parameter to the event handler.</p>
  <p>Scroll down to the table rendered below the chart to view information contained in the eventObj object.</p>
  
</div>
<div id="chart-container">FusionCharts will render here</div>
<div>
  <div>
    <div id="header">
      <div class="parameter-name">Parameter Name</div>
      <div class="parameter-value">Parameter Value</div>
    </div>
    <div id="attrs-table"></div>
  </div>
</div>

CSS

body {
  padding: 5px;
  margin: 0 auto;
}
strong {
  font-weight: bold;
}
#header {
  display: none;
}

#indicatorDiv {
  width: 500px;
  font-family: 'Arial', 'Helvetica';
  font-size: 13px;
}

p {
  margin-top: 20px;
  margin-bottom: 20px;
}

#attrs-table {
  text-align: center;
  width: 500px;
}

.parameter-name,
.parameter-value {
  width: 250px;
  font-weight: bold;
  text-align: center;
  float: left;
  font-family: 'Arial', 'Helvetica';
  font-size: 13px;
}

.title,
.value {
  float: left;
  width: 230px;
  height: 20px;
  background: #fff;
  padding: 5px 10px;
}

.title {
  clear: left;
  font-family: 'Arial', 'Helvetica';
  font-size: 13px;
}

.title:nth-child(4n+1),
.value:nth-child(4n+2) {
  background: rgb(0, 117, 194);
  color: #fff;
  font-family: 'Arial', 'Helvetica';
  font-size: 13px;
}

.value {
  word-wrap: break-word;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-family: 'Arial', 'Helvetica';
  font-size: 13px;
}

JavaScript

FusionCharts.ready(function() {
  var revenueChart = new FusionCharts({
    type: 'column2d',
    renderAt: 'chart-container',
    width: '500',
    height: '350',
    dataFormat: 'json',
    dataSource: {
      "chart": {
        "caption": "Monthly revenue for last year",
        "subCaption": "Harry's SuperMart",
        "xAxisName": "Month",
        "yAxisName": "Revenue (In USD)",
        "numberPrefix": "$",
        "paletteColors": "#0075c2",
        "bgColor": "#ffffff",
        "borderAlpha": "20",
        "canvasBorderAlpha": "0",
        "usePlotGradientColor": "0",
        "plotBorderAlpha": "10",
        "placevaluesInside": "1",
        "rotatevalues": "1",
        "valueFontColor": "#ffffff",
        "showXAxisLine": "1",
        "xAxisLineColor": "#999999",
        "divlineColor": "#999999",
        "divLineIsDashed": "1",
        "showAlternateHGridColor": "0",
        "captionFontSize": "13",
        "subcaptionFontBold": "0",
        "subcaptionFontSize": "12"
      },
      "data": [{
        "label": "Jan",
        "value": "420000"
      }, {
        "label": "Feb",
        "value": "810000"
      }, {
        "label": "Mar",
        "value": "720000"
      }, {
        "label": "Apr",
        "value": "550000"
      }, {
        "label": "May",
        "value": "910000"
      }, {
        "label": "Jun",
        "value": "510000"
      }, {
        "label": "Jul",
        "value": "680000"
      }, {
        "label": "Aug",
        "value": "620000"
      }, {
        "label": "Sep",
        "value": "610000"
      }, {
        "label": "Oct",
        "value": "490000"
      }, {
        "label": "Nov",
        "value": "900000"
      }, {
        "label": "Dec",
        "value": "730000"
      }]
    },
    "events": {

      /**
       * @description
       * This event is triggered when the data for a chart (passed by url or as a string) is loaded to the chart object.
       *
       * @param {Object} eventObj: An object containing all...