HTML Editor
<!DOCTYPE html> <html lang="en-US"> <head> <script src="https://www.gstatic.com/charts/loader.js"></script> </head> <body> <div id="point"> </div> <script> google.charts.load('current', {packages:['corechart']}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Week', 'Bugs', 'Tests'], [1, 175, 10], [2, 159, 20], [3, 136, 35], [4, 139, 40], [5, 108, 60], [6, 92, 70], [7, 55, 72], [8, 50, 97] ]); var options = { title: 'Google Emotion Robot: Bugs and Tests', width: 600, height: 400, hAxis: { title: 'Week', format: '#', viewWindow: {min:0, max:9}, gridlines: {count: 10} }, colors: ['#795548', '#F48400'], trendlines: { 0: { labelInLegend: 'Bug line', visibleInLegend: true, }, 1: { labelInLegend: 'Test line', visibleInLegend: true, } } }; var chart = new google.visualization.ColumnChart(document.getElementById('point')); chart.draw(data, options); } </script> </body> </html>
OUTPUT
×

Save as Private