FusionCharts - Horizontal LED Gauge showing a single fill color

Created using FusionCharts Suite XT - www.fusioncharts.com

by FusionCharts

HTML

<script src="https://cdn.fusioncharts.com/fusioncharts/latest/fusioncharts.js"></script>
<script src="https://cdn.fusioncharts.com/fusioncharts/latest/themes/fusioncharts.theme.fusion.js"></script>
<!-- 
    A simple HLED Gauge showing a single fill color for its background and fill.
    
    Attribute:
        # useSameFillColor - Set to 1
        # useSameFillBgColor - Set to 1
 -->
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function() {
  var chargePercent = 50,
    flag = 0,
    count = 0,
    chart = new FusionCharts({
      type: 'hled',
      renderAt: 'chart-container',
      id: 'myHLED',
      width: '300',
      height: '200',
      dataFormat: 'json',
      dataSource: {
        "chart": {
          "theme": "fusion",
          "caption": "Battery Charge Remaining",
          "lowerLimit": "0",
          "upperLimit": "100",
          "lowerLimitDisplay": "Empty",
          "upperLimitDisplay": "Full",
          "numberSuffix": "%",
          "valueFontSize": "12",
          "origW": "300",
          "origH": "200",
          "ledGap": "0",
          "showhovereffect": "1",
          //Single Fill color
          "useSameFillColor": "1",
          "useSameFillBgColor": "1",

          "chartBottomMargin": "20",
          "theme": "fusion"
        },
        //All annotations are grouped under this element
        "annotations": {
          "showbelow": "1",
          "groups": [{
            //Each group needs a unique ID
            "id": "indicator",
            "items": [

              {
                "id": "bgRectAngle",
                //Polygon item 
                "type": "rectangle",
                "radius": "5",
                "fillColor": "#333333",
                "x": "$gaugeEndX - 10",
                "tox": "$gaugeEndX + 12",
                "y": "$gaugeCenterY-20",
                "toy": "$gaugeCenterY + 20"
              }
            ]
          }]

        },
        "colorRange": {
          "color": [{
              "minValue": "0",
              "maxValue": "45",
              "code": "#e44a00"
            },
            {
              "minValue": "45",
              "maxValue": "75",
              "code": "#f8bd19"
            },
            {
              "minValue": "75",
              "maxValue": "100",
              "code": "#6baa01"
            }
          ]
        },
        "value": "50"
      },
      "events": {
   ...