<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/fusioncharts.charts.js"></script>
<!-- Multi-series 2D Single Y Combination Chart. -->
<div id="chart-container">FusionCharts will render here</div>
JavaScript
FusionCharts.ready(function () {
var salesAnlysisChart = new FusionCharts({
type: 'mscombi2d',
renderAt: 'chart-container',
width: '600',
height: '300',
dataFormat: 'json',
dataSource: {
//All annotations are grouped under this element
"annotations": {
"drawImmediately": "1",
"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": "CalloutBase1",
//This item is of type rectangle
"type": "rectangle",
"radius": "2",
"alpha": "100",
"fillColor": "#ff0000",
//Setting x and y position based on annotation macros.
"x": "$legendStartX",
"y": "$legendStartY",
"tox": "$legendEndX",
"toy": "$legendEndY",
"toolText": "Legend Tooltip"
}]
}]
},
"chart": {
"caption": "Harry's SuperMart",
"subCaption": "Sales analysis of last year",
"xAxisname": "Month",
"yAxisName": "Amount (In USD)",
"numberPrefix": "$",
"showBorder": "0",
"showValues": "0",
"paletteColors": "#0075c2,#1aaf5d,#f2c500",
...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.