Javascript examples for Google Chart:Chart Configuration
Create chart from Json data Using Javascript
<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([ ['Age', 'Weight'], [8, 12],//www. ja va2 s . com [4, 5.5], [11, 14], [4, 5], [3, 3.5], [6.5, 7], ]); var options = { title: 'Age vs. Weight comparison', hAxis: {title: 'Age', minValue: 0, maxValue: 15}, vAxis: {title: 'Weight', minValue: 0, maxValue: 15}, legend: 'none' }; var chart = new google.visualization.ScatterChart(document.getElementById('chart')); chart.draw(data, options); } </script> </head> <body> <div id="chart" sytle="width:900px;height:500px;"></div> </body> </html>