google.load('visualization', '1.0', {'packages':['corechart']}); google.setOnLoadCallback(function(){ var data = new google.visualization.DataTable(); data.addColumn('string', '日'); data.addColumn('number', '推測'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addColumn('number', 'iOS総合'); data.addColumn({type:'string', role:'annotation'}); data.addColumn({type:'string', role:'annotationText'}); data.addRows([ ['02:05',760,'【760位】','760位',null,null,null], ['03:10',760,null,null,null,null,null], ['04:15',760,null,null,null,null,null], ['04:20',775,'【775位】','775位',null,null,null], ['04:30',780,null,null,null,null,null], ['05:35',780,null,null,null,null,null], ['06:40',780,null,null,null,null,null], ['07:20',781,'【781位】','781位',null,null,null], ['07:30',806,null,null,null,null,null], ['07:35',805,null,null,null,null,null], ['07:45',801,'【801位】','801位',null,null,null], ['08:50',801,null,null,null,null,null], ['09:55',801,null,null,null,null,null], ['10:15',805,'【805位】','805位',null,null,null], ['10:20',810,null,null,null,null,null], ['10:35',806,null,null,null,null,null], ['11:40',806,null,null,null,null,null], ['12:45',806,null,null,null,null,null], ['13:05',787,'【787位】','787位',null,null,null], ['13:15',788,null,null,null,null,null], ['13:20',789,null,null,null,null,null], ['13:30',790,'【790位】','790位',null,null,null], ['14:35',790,null,null,null,null,null], ['15:40',790,null,null,null,null,null], ['16:30',787,'【787位】','787位',null,null,null], ['16:35',891,null,null,null,null,null], ['16:45',889,null,null,null,null,null], ['16:50',851,null,null,null,null,null], ['17:55',851,null,null,null,null,null], ['19:00',851,null,null,null,null,null], ['19:15',836,'【836位】','836位',null,null,null], ['19:20',844,null,null,null,null,null], ['19:30',843,null,null,null,null,null], ['20:35',843,null,null,null,null,null], ['21:40',843,null,null,null,null,null], ['22:15',842,'【842位】','842位',null,null,null], ['22:20',777,null,null,null,null,null], ['22:30',801,null,null,null,null,null], ['23:35',801,null,null,null,null,null], ['00:40',801,null,null,null,null,null], ['01:15',826,'【826位】','826位',null,null,null], ['01:20',771,null,null,null,null,null], ['01:30',830,null,null,null,null,null], ['01:35',780,null,null,null,null,null], ['02:00',780,null,null,null,null,null] ]); var options = { chartArea: {'width':'90%', 'height':'65%', 'left':40 }, 'pointSize': 3, hAxis: { titleTextStyle:{italic:false}, format:'#',ticks: [1,5,10,15,20,25,30] }, vAxis: { format:'#',viewWindow:{min:750,max:900},direction:-1 }, legend: {position: 'top' }, tooltip: { trigger: 'both' }, focusTarget: 'category', colors:['pink','#e74c3c'] }; var chart = new google.visualization.LineChart(document.getElementById('graphField')); chart.draw(data, options); var lastlogday=0 -1 ; var lastlogcat=6; if(lastlogday>=0){ chart.setSelection([{ row: lastlogday, column: lastlogcat }]); google.visualization.events.addListener(chart, 'click', function() { if(chart.getSelection()[0]){ //chart.setSelection(null) } }); } });