FusionCharts API-Event: nodeDeleted

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.fint.js"></script>
<!-- This sample shows the event parameters, and their values, when nodeDeleted event is triggered-->
<div id="indicatorDiv">Event name: <strong> nodeDeleted </strong>     
    <p>Triggered when a node on the drag-node chart is deleted.</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>Click and hold the mouse pointer on the node to be deleted. From the dialog box rendered, click <strong> Delete </strong> to <strong> delete the node </strong> and <strong> trigger the event</strong>.</p>
    <p>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 railwayChart = new FusionCharts({
        type: 'dragnode',
        renderAt: 'chart-container',
        width: '500',
        height: '425',
        dataFormat: 'json',
        dataSource: {
            "chart": {
                "caption": "Railway Map",
                    "xaxisminvalue": "0",
                    "xaxismaxvalue": "100",
                    "yaxisminvalue": "0",
                    "yaxismaxvalue": "100",
                    "is3d": "0",
                    "showformbtn": "1",
                    "formaction": "dragnodeData.php",
                    "formtarget": "_blank",
                    "formmethod": "POST",
                    "formbtntitle": "Save",
                    "viewmode": "0",
                    "showplotborder": "1",
                    "plotborderthickness": "4",
                    "theme": "fint",
                    "showcanvasborder": "1",
                    "canvasborderalpha": "20",
                    "animation": "0"
            },
                "dataset": [{
                "data": [{
                    "id": "01",
                        "label": "Santa Monica",
                        "color": "#ffffff",
                        "x": "16",
                        "y": "54",
                        "radius": "30",
                        "shape": "circle"
                }, {
                    "id": "02",
                        "label": "Los Angeles",
                        "color": "#ffffff",
                        "x": "27",
                        "y": "54",
                        "radius": "30",
                        "shape": "circle"
                }, {
                    "id": "03",
                        "label": "Ontario",
                        "color": "#ffffff",
                        "x": "48",
                        "y": "54",
                        "radius": "30",
                        "shape": "circle"
                }, {
                ...