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.charts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<div id="chart-container">FusionCharts XT will load here!</div>
JavaScript
FusionCharts.ready(function(){
var fusioncharts = new FusionCharts({
type: 'stackedbar2d',
renderAt: 'chart-container',
width: '500',
height: '300',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Revenue split by product category",
"subCaption": "For current year",
"xAxisname": "Quarter",
"yAxisName": "Revenues (In USD)",
"showSum": "1",
"adjustDiv":"0",
"divlineAlpha":"0",
"showXAxisLine":"0",
"showYAxisValues":"0",
"numberPrefix": "$",
"theme": "fint"
},
"categories": [{
"category": [{
"label": "Q1"
}, {
"label": "Q2"
}, {
"label": "Q3"
}, {
"label": "Q4"
}]
}],
"dataset": [{
"seriesname": "Food Products",
"data": [{
"value": "11000"
}, {
"value": "15000"
}, {
"value": "13500"
}, {
"value": "15000"
}]
}, {
"seriesname": "Non-Food Products",
"data": [{
"displayValue":"11000",
"value": "-11000"
}, {
"value": "-15000"
}, {
"value": "-13500"
}, {
"value": "-15000"
}]
}],
"trendlines": [{
"line": [{
"startvalue": "0",
"displayvalue": "$0"
},
{
"startvalue": "-8100",
"displayvalue": "$8.1k"
},
{
"startvalue": "8100",
"displayvalue": "$8.1k"
},
{
"startvalue": "-16200",
"displayvalue": "$16.2k"
},
{
...