JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://static.fusioncharts.com/code/latest/fusioncharts.js?cacheBust=434"></script>
<script src="https://static.fusioncharts.com/code/latest/fusioncharts.charts.js?cacheBust=434"></script>
<script src="https://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js?cacheBust=434"></script>
<script src="https://axibase.com/atsd/atsdClient.bundle.js"></script>
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var startTime = Date.now() - 60 * 60 * 1000,
endTime = Date.now();
var postData = [{
startTime: startTime,
endTime: endTime,
entity: "NURSWGVML007",
metric: "disk_used_percent",
tags: {
mount_point: ["/"]
}
}];
var client = axibase.atsdClient("https://axibase.com");
client.series.queries(postData)
.then(function(response) {
var chart = new FusionCharts({
type: 'hlineargauge',
renderAt: 'chart-container',
id: 'cs-linear-gauge',
width: '400',
height: '140',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Disk used",
"subcaption": "NURSWGVML007",
"captionFontColor": "#000000",
"subcaptionFontBold": "0",
"bgColor": "#ffffff",
"showBorder": "0",
"lowerLimit": "0",
"upperLimit": "100",
"numberSuffix": "%",
"valueAbovePointer": "0",
"showShadow": "0",
"gaugeFillMix": "{light}",
"valueBgColor": "#ffffff",
"valueBgAlpha": "60",
...