FusionCharts - Annotation Shapes: Image scaling
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>
<!-- The rectangle drawn to highlight the lowest footfall is created using the path annotation. -->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function() {
var revenueChart = new FusionCharts({
type: 'column2d',
renderAt: 'chart-container',
id: "myChart",
width: '550',
height: '350',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Comparison of Quarterly Revenue",
"subCaption": "Last Year",
"showBorder": "0",
"xAxisName": "Quarter",
"yAxisName": "Amount (In USD)",
"numberPrefix": "$",
"yAxisMaxValue": "50000",
"showValues": "0",
"showTooltip": "0",
"animation": "0",
//Theme
"theme": "fusion"
},
"data": [{
"label": "Q1",
"value": "30400"
}, {
"label": "Q2",
"value": "29800"
}, {
"label": "Q3",
"value": "21800"
}, {
"label": "Q4",
"value": "26800"
}],
//All annotations are grouped under this element
"annotations": {
"showbelow": "0",
//Annotations on a chart can be divided across multiple groups for easy management, and manipulation through API
"groups": [{
//Each group needs a unique ID
"id": "Callout",
//Under each group, you can define multiple items. Each item is a polygon, text or image - with its own set of parameters.
"items": [{
//Each item needs a unique ID
"id": "CalloutBase",
//This item is of type rectangle
"type": "rectangle",
"radius": "2",
"alpha": "90",
"fillColor": "#6baa01"
}, {
"id": "CalloutTriangle",
//Polygon item
"type": "polygon",
//With 3 sides, so it is a triangle
"sides": "3",
"startangle": "270",
"alpha": "90",
"fillColor": "#6baa01",
"radius": "9",
}, {
"id": "CalloutLabel",
...