Home
Tutorials
Microsoft Technologies Tutorials
Java Programming Tutorials
Web Designing Tutorials
Script Programming Tutorials
Database Programming Tutorials
Mobile Technologies Tutorials
Other Programming Tutorials
Examples
Articles
Tools
News
Highcharts Time Series Zoomable Chart Example
Keywords : Time series zoomable chart using highcharts with example, How to implement chart with zommable time series using highcharts with example
Example
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Highcharts Time series, zoomable chart</title> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <script type="text/javascript"> $(function () { var chartype = { zoomType: 'x' } var chartitle = { text: 'USD to EUR exchange rate over time' } var chartsubtitle = { text: document.ontouchstart === undefined ? 'Click and drag in the plot area to zoom in' : 'Pinch the chart to zoom in' } var chartxaxis = { type: 'datetime' } var chartyaxis = { title: { text: 'Exchange rate' } } var chartlegend= { enabled: false } var chartplotoptions = { area: { fillColor: { linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 }, stops: [ [0, Highcharts.getOptions().colors[0]], [1, Highcharts.Color(Highcharts.getOptions().colors[0]).setOpacity(0).get('rgba')] ] }, marker: { radius: 2 }, lineWidth: 1, states: { hover: { lineWidth: 1 } }, threshold: null } } $.getJSON('https://www.highcharts.com/samples/data/jsonp.php?filename=usdeur.json&callback=?', function (data) { $('#container').highcharts({ chart:chartype, title: chartitle, subtitle: chartsubtitle, xAxis: chartxaxis, yAxis: chartyaxis, legend: chartlegend, plotOptions: chartplotoptions, series: [{ type: 'area', name: 'USD to EUR', data: data }] }); }); }); </script> </head> <body> <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> </body> </html>
Click Here to See Result
Result
Previous
Next