FusionCharts API-Event: scrollStart
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.charts.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 scrollStart event is triggered-->
<div id="indicatorDiv">Event name: <strong> onScroll </strong>
<p>Triggered while scrolling through a zoom-line chart or scroll charts.</p>
<p>When triggered, the <strong> onScroll </strong>event returns <strong> eventObj </strong> object (object containing information generic to all events) parameter to the event handler.</p>
<p>Scroll down to the table rendered below the chart to view information contained in the eventObj object.</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: 13px;
}
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;
font-family:'Arial', 'Helvetica';
font-size: 13px;
}
.title, .value {
float:left;
width: 230px;
height: 20px;
background: #fff;
padding: 5px 10px;
}
.title {
clear: left;
font-family:'Arial', 'Helvetica';
font-size: 13px;
}
.title:nth-child(4n+1), .value:nth-child(4n+2) {
background: rgb(0, 117, 194);
color: #fff;
font-family:'Arial', 'Helvetica';
font-size: 13px;
}
.value {
word-wrap: break-word;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-family:'Arial', 'Helvetica';
font-size: 13px;
}
JavaScript
FusionCharts.ready(function () {
var revenueChart = new FusionCharts({
type: 'scrollColumn2d',
renderAt: 'chart-container',
width: '500',
height: '350',
dataFormat: 'json',
dataSource: {
"chart": {
"caption": "Sales Trends",
"subcaption": "FY 2012 - FY 2013",
"xaxisname": "Month",
"yaxisname": "Revenue",
"showvalues": "1",
"placeValuesInside": "1",
"rotateValues": "1",
"valueFontColor": "#ffffff",
"numberprefix": "$",
//Cosmetics
"baseFontColor": "#333333",
"baseFont": "Helvetica Neue,Arial",
"captionFontSize": "14",
"subcaptionFontSize": "14",
"subcaptionFontBold": "0",
"showborder": "0",
"paletteColors": "#0075c2",
"bgcolor": "#FFFFFF",
"showalternatehgridcolor": "0",
"showplotborder": "0",
"labeldisplay": "WRAP",
"divlinecolor": "#CCCCCC",
"showcanvasborder": "0",
"linethickness": "3",
"plotfillalpha": "100",
"plotgradientcolor": "",
"numVisiblePlot": "12",
"divlineAlpha": "100",
"divlineColor": "#999999",
"divlineThickness": "1",
"divLineIsDashed": "1",
"divLineDashLen": "1",
"divLineGapLen": "1",
"scrollheight": "10",
"flatScrollBars": "1",
"scrollShowButtons": "0",
"scrollColor": "#cccccc",
"showHoverEffect": "1",
"captionFontSize": "13",
...