Setting alpha of data plots

Configuring the chart with theme that applies on chart cosmetics

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.carbon.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.ocean.js"></script>
<script src="http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.zune.js"></script>
<div id="chart-container">FusionCharts will render here</div>

JavaScript

FusionCharts.ready(function () {
    var revenueChart = new FusionCharts({
        type: 'mscolumn2d',
        renderAt: 'chart-container',
        width: '500',
        height: '300',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Comparison of Quarterly Revenue",
                "subCaption": "Harry's SuperMart",
                "xAxisname": "Quarter",
                "yAxisName": "Amount ($)",
                "numberPrefix": "$",
                // Theme can be set to "zune", "ocean" or "carbon"
                "theme": "zune",
                "plotFillAlpha":"50"
            },
            "categories": [{
                "category": [
                    { "label": "Q1" },
                    { "label": "Q2" },
                    { "label": "Q3" },
                    { "label": "Q4" }
                ]
            }],
            "dataset": [
                {
                    "seriesname": "Previous Year",
                    "data": [
                        { "value": "10000" },
                        { "value": "11500","alpha":"100" },
                        { "value": "12500","alpha":"100" },
                        { "value": "15000" }
                    ]
                },
                {
                    "seriesname": "Current Year",
                    "data": [
                        { "value": "25400" },
                        { "value": "29800" },
                        { "value": "21800" },
                        { "value": "26800" }
                    ]
                }
            ]
        }
    });

    revenueChart.render();
});