bar_chart.html
<html>
<head>
<script type="text/javascript" src="fusioncharts/js/fusioncharts.js"></script>
<script type="text/javascript" src="fusioncharts/js/themes/fusioncharts.theme.fint.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
</head>
<body>
<script>
FusionCharts.ready(function () {
var revenueChart = new FusionCharts({
type: 'doughnut2d',
renderAt: 'chart-container',
width: '450',
height: '450',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "",
"subCaption": "",
"numberPrefix": "$",
"paletteColors": "#5b9bd5,#ed7d31,#f2c500,#f45b00,#8e0000",
"bgColor": "#ffffff",
"showBorder": "0",
"use3DLighting": "0",
"showShadow": "0",
"enableSmartLabels": "0",
"startingAngle": "310",
"showLabels": "0",
"showPercentValues": "1",
"showLegend": "1",
"legendShadow": "0",
"legendBorderAlpha": "0",
"defaultCenterLabel": "Assets",
"centerLabel": "Revenue from $label: $value",
"centerLabelBold": "1",
"showTooltip": "0",
"decimals": "0",
"captionFontSize": "14",
"subcaptionFontSize": "14",
"subcaptionFontBold": "0"
},
"data": [
{
"label": "",
"value": "73%"
},
{
"label": "",
"value": "27%"
}
]
}
}).render();
});
</script>
</head>
<body>
<div id="chart-container">FusionCharts will render here</div>
</body>
<div ng-app="" ng-init="names=[
{name:'My Bank',accounts:'40 accounts',IDR:'800,000,000.00' },
{name:'External Bank',accounts:'4 accounts', IDR: '300,000,000.00'}
]">
<table border="1">
<tr ng-repeat="x in names">
<td>{{ x.name }}</td>
<td>{{ x.accounts }}</td>
<td>{{ x.IDR }}</td>
</tr>
<tr>
<td>Total Assets</td>
<td></td>
<td>{{ 3 * 2 }}</td>
</tr>
</table>
</body>
</html>
Check my code above. how to take the table data from a seperate json file and for the fusion chart, how to seperate the json file?
Next, how to find the total assets from the x.IDR all being added ?
Thanks.