FusionCharts - Get value/annotations on click in column2d

Created using FusionCharts Suite XT - www.fusioncharts.com

by Nabajeet Sonowal

HTML

<script src="http://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js"></script>
<div id="chart-container">FusionCharts will render here</div>
<div id="tableCont">
     <h3>Click on the pie slices to highlight the value of the slice.</h3>

</div>

JavaScript

FusionCharts.ready(function () {
    var revenueChart = new FusionCharts({
        type: 'column2d',
        renderAt: 'chart-container',
        width: '450',
        height: '300',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Split of revenue by product categories",
                    "subCaption": "Last year",
                    "numberPrefix": "$",
                    "theme": "fint"
            },
                "data": [{
                "label": "Food",
                    "value": "285040"
            }, {
                "label": "Apparels",
                    "value": "146330"
            }, {
                "label": "Electronics",
                    "value": "105070"
            }, {
                "label": "Household",
                    "value": "49100"
            }],
            //All annotations are grouped under this element
            "annotations": {
                "drawImmediately": "1",
                    "showbelow": "1",
                //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",
                        //Setting x and y position based on annotation macros. Here we're statically positioning it w.r.t 2nd column (0 base in JavaScript) of 1st dataset. Hence $dataset.0.set.1.x
               ...