Javascript examples for Google Chart:Axis
Google Charts Y-Axis configuration
<html lang="en"> <head> <title> Matt Rice</title> </head> <body translate="no"> <div id="chart_div"></div> <script src="https://www.gstatic.com/charts/loader.js"></script> <script> google.charts.load('current', { 'packages': ['corechart', 'bar'] }); google.charts.setOnLoadCallback(function () { var title = 'Total Sales By Market and Year'; var subtitle = 'Cincinnati, Cleveland, Columbus, and Dayton'; var dataTable = new google.visualization.DataTable( {"cols":[{"label":"UsageDates","type":"string"},{"label":"C1","type":"number"},{"label":"C2","type":"number"},{"label":"C3","type":"number"},{"label":"C4","type":"number"}],"rows":[{"c":[{"v":"14.06.2016"},{"v":0},{"v":0},{"v":6},{"v":7}]},{"c":[{"v":"15.06.2016"},{"v":50},{"v":0},{"v":0},{"v":0}]},{"c":[{"v":"16.06.2016"},{"v":0},{"v":13},{"v":1},{"v":3}]},{"c":[{"v":"20.06.2016"},{"v":5},{"v":7},{"v":0},{"v":0}]}]} );/*from ww w . jav a 2 s.c o m*/ drawColumnChart('chart_div', title, dataTable); }); function drawColumnChart(elementId, title, dataTable) { var options = { title: title, vAxis: { format: 'decimal' } }; var chart = new google.visualization.ColumnChart(document.getElementById(elementId)); chart.draw(dataTable, options); } //# sourceURL=pen.js </script> </body> </html>