JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.widgets.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<!-- Showcase of Customer Satisfaction Score for current week using Angular Gauge. Configuring the Lower and Upper limit as specific texts.
Attributes:
#. lowerLimitDisplay - set to Bad
#. upperLimitDisplay - set to Good
-->
<div style="width:250px;height:100px" id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function () {
var cSatScoreChart = new FusionCharts({
type: 'angulargauge',
renderAt: 'chart-container',
width: '100%',
height: '100%',
dataFormat: 'json',
dataSource: {
"chart": {
"lowerLimit": "20",
"upperLimit": "100",
"lowerLimitDisplay": "Bad",
"upperLimitDisplay": "Good",
//to set the chart margin use these attributes used below
"chartLeftMargin":"-20",
"chartRightMargin":"-20",
"chartTopMargin":"-12",
"chartBottomMargin":"-10",
"showValue": "0",
"valueBelowPivot": "0",
"theme": "fint"
},
"colorRange": {
"color": [
{
"minValue": "20",
"maxValue": "50",
"code": "#e44a00"
},
{
"minValue": "50",
"maxValue": "75",
"code": "#f8bd19"
},
{
"minValue": "75",
"maxValue": "100",
"code": "#6baa01"
}
]
},
"dials": {
"dial": [{
"value": "67"
}]
},
"trendPoints": {
"point": [
{
"startValue": "45",
"color": "#0075c2",
"displayValue":"Last Avg.",
"useMarker": "1",
"markerRadius":"7"
}
]
}
}
}).render();...