FusionCharts API-Event: legendPointerDragStart

Created using FusionCharts Suite XT - www.fusioncharts.com

by FusionCharts

HTML

<script src="https://static.fusioncharts.com/code/latest/fusioncharts.js"></script>
<script src="https://static.fusioncharts.com/code/latest/fusioncharts.powercharts.js"></script>
<script src="https://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fusion.js"></script>
<!-- This sample shows the event parameters, and their values, when legendPointerDragStart event is triggered-->
<div id="indicatorDiv">Event name: <strong> legendPointerDragStart </strong> 
    
   <p>Triggered when the user starts dragging the legend pointer of a gradient legend, in the heatmap chart and maps.</p>
   <p>All events, when triggered, will provide two parameters for the handler - <strong> eventObj </strong> (object containing information generic to all events) and <strong> dataObj </strong> (object containing information specific to an event).</p>
   <p>Drag a legend pointer to trigger the event. Scroll down to the table rendered below the chart to view information contained in the dataObj object. To view information contained in the eventObj object, open the console.</p>
    
</div>
<div id="chart-container">FusionCharts will render here</div>
<div>
    <div>
        <div id="header">
            <div class="parameter-name">Parameter Name</div>
            <div class="parameter-value">Parameter Value</div>
        </div>
        <div id="attrs-table"></div>
    </div>
</div>

CSS

body {
    padding: 5px;
    margin: 0 auto;
}

strong {
  font-weight: bold;
}
#header {
    display: none;
}
#indicatorDiv {
    width: 500px;
    font-family:'Arial', 'Helvetica';
    font-size: 14px;
}
p {
    margin-top: 20px;
    margin-bottom: 20px;
}
#attrs-table {
    text-align: center;
    width: 500px;
}
.parameter-name, .parameter-value {
    width: 250px;
    font-weight: bold;
    text-align: center;
    float: left;
}
.title, .value {
    float:left;
    width: 230px;
    height: 20px;
    background: #fff;
    padding: 5px 10px;
}
.title {
    clear: left;
}
.title:nth-child(4n+1), .value:nth-child(4n+2) {
    background: rgb(0, 117, 194);
    color: #fff;
}
.value {
    word-wrap: break-word;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

JavaScript

FusionCharts.ready(function () {
    var salesHMChart = new FusionCharts({
        type: 'heatmap',
        renderAt: 'chart-container',
        width: '500',
        height: '270',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "theme": "fusion",
                    "caption": "Top Smartphone Ratings",
                    "subcaption": "By Features",
                    "xAxisName": "Features",
                    "yAxisName": "Model",
                    "showPlotBorder": "1"
            },
                "rows": {
                "row": [{
                    "id": "SGS5",
                        "label": "Samsung Galaxy S5"
                }, {
                    "id": "HTC1M8",
                        "label": "HTC One (M8)"
                }, {
                    "id": "IPHONES5",
                        "label": "Apple iPhone 5S"
                }, {
                    "id": "LUMIA",
                        "label": "Nokia Lumia 1520"
                }]
            },
                "columns": {
                "column": [{
                    "id": "processor",
                        "label": "Processor"
                }, {
                    "id": "screen",
                        "label": "Screen Size"
                }, {
                    "id": "price",
                        "label": "Price"
                }, {
                    "id": "backup",
                        "label": "Battery Backup"
                }, {
                    "id": "cam",
                        "label": "Camera"
                }]
            },
                "dataset": [{
                "data": [{
                    "rowid": "SGS5",
                        "columnid": "processor",
                        "value": "8.7",
                        "tlLabel": "Quad Core 2.5 GHz",
                        "trLabel": "OS : Android 4.4 Kitkat"
                }, {
                    "rowid": "SGS5",
                       ...