FusionCharts - Gallery Example - Area 2D Chart

Created using FusionCharts Suite XT - www.fusioncharts.com

HTML

<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<!-- A simple implementation of Area 2D chart showing daily trend of liquor sales for the last week -->
<div id="chart-container">FusionCharts will render here</div>

<table class="">
        <tr>
            <td><div id="ph-container" style="float:left;"></div></td>

        </tr>
    </table>

JavaScript

FusionCharts.ready(function () {
  LoadChart();
});

function LoadChart() {
  $.ajax({
    url: 'https://api.thingspeak.com/channels/230372/fields/field1/last?api_key=EG628M4J9SP769UT', // local address
    type: 'GET',
    crossDomain: true,
    success: function (data) {
    	console.log('xhr success')
      //if (data.success) {
      	console.log("success");
        var chlorine = data;
        var phfusioncharts = new FusionCharts({
          type: 'angulargauge',
          renderAt: 'ph-container',
          width: '450',
          height: '300',
          dataFormat: 'json',
          dataSource: {
            "chart": {
              "caption": "Chlorine ",
              "lowerLimit": "0",
              "upperLimit": "14",
              "showValue": "1",
              "valueBelowPivot": "1",
              "theme": "fint"
            },
            "colorRange": {
              "color": [{
                "minValue": "0",
                "maxValue": "5",
                "code": "#6baa01"
              }, {
                "minValue": "5",
                "maxValue": "10",
                "code": "#f8bd19"
              }, {
                "minValue": "10",
                "maxValue": "14",
                "code": "#e44a00"
              }]
            },
            "dials": {
              "dial": [{
                "value": "22"
              }]
            }
          }
        });

        phfusioncharts.render();
      //}
    }
  });
}