Javascript examples for Google Chart:Line Chart
Google line chart with only zero and positive ones
<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() {//from w w w . j ava 2 s. co m var data = google.visualization.arrayToDataTable([["Day", "Value"], ["15", 0], ["16", 0], ["17", 0], ["18", 0], ["19", 0], ["20", 0], ["21", 7], ["22", 0], ["23", 0], ["24", 0], ["25", 0]]); var options = { title: 'Company Performance', legend: { position: 'bottom' } }; var chart = new google.visualization.LineChart(document.getElementById('curve_chart')); chart.draw(data, options); } </script> </head> <body> <div id="curve_chart" style="width: 900px; height: 500px"></div> </body> </html>