Configuring Charts - Customizing hover effects for anchors in JavaScript charts

Created using FusionCharts Suite XT - www.fusioncharts.com

by Moonmi 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>
<!-- Using Hover effect on anchors for line charts. Roll over the anchors to see the effect. Attributes : # plotHoverEffect - Set to 1 //Following attributes helps to configure the anchor cosmetics on hover # anchorBgHoverColor - Background color of anchor upon hover # anchorBorderHoverColor - Border color of anchor upon hover (Not used in this sample) # anchorBorderHoverThickness - Border thickness of anchor upon hover # anchorHoverRadius - Radius of anchor upon hover -->

JavaScript

FusionCharts.ready(function () {
    var visitChart = new FusionCharts({
        type: 'line',
        renderAt: 'chart-container',
        width: '500',
        height: '300',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Visitors to website",
                    "subCaption": "Last week",
                    "xAxisName": "Day",
                    "yAxisName": "Visits",
                    "theme": "fint",
                    "anchorRadius": "1",
                //Additional anchor hover cosmetics attributes
                "anchorBgHoverColor": "#96d7fa",
                    "anchorBorderHoverThickness": "4",
                    "anchorHoverRadius": "7",

            },
                "data": [{
                "label": "Mon",
                    "value": "5123"
            }, {
                "label": "Tue",
                    "value": "4233"
            }, {
                "label": "Wed",
                    "value": "5507"
            }, {
                "label": "Thu",
                    "value": "4110"
            }, {
                "label": "Fri",
                    "value": "5529"
            }, {
                "label": "Sat",
                    "value": "5803"
            }, {
                "label": "Sun",
                    "value": "6202"
            }]
        }
    }).render();
});