Javascript examples for Google Chart:Line Chart
Google Charts Line chart creation
<html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load('current', {'packages':['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Datum', 'Temp'], ['2002',7], ['2005',50], ['2007',120], ['2009',90], ]);/*from w w w . j av a2s . c om*/ var options = { title: 'Temperatur', curveType: 'function', legend: { position: 'right' } }; var chart = new google.visualization.LineChart(document.getElementById('chart_div')); chart.draw(data, options); } </script> </head> <body> <div id="chart_div" style="height: 654px"></div> </body> </html>