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([ ['06:50',474,'【474位】','474位',null,null,null], ['07:15',475,'【475位】','475位',null,null,null], ['07:20',481,null,null,null,null,null], ['08:25',481,null,null,null,null,null], ['09:30',481,null,null,null,null,null], ['10:15',479,'【479位】','479位',null,null,null], ['10:30',480,null,null,null,null,null], ['10:35',477,null,null,null,null,null], ['11:40',477,null,null,null,null,null], ['12:45',477,null,null,null,null,null], ['13:15',495,'【495位】','495位',null,null,null], ['13:25',468,null,null,null,null,null], ['13:35',493,null,null,null,null,null], ['14:40',493,null,null,null,null,null], ['15:45',493,null,null,null,null,null], ['16:15',484,'【484位】','484位',null,null,null], ['16:20',491,null,null,null,null,null], ['17:25',491,null,null,null,null,null], ['18:30',491,null,null,null,null,null], ['19:15',492,'【492位】','492位',null,null,null], ['19:20',491,null,null,null,null,null], ['20:25',491,null,null,null,null,null], ['21:30',491,null,null,null,null,null], ['22:15',481,'【481位】','481位',null,null,null], ['22:35',482,null,null,null,null,null], ['23:40',482,null,null,null,null,null], ['00:45',482,null,null,null,null,null], ['01:15',480,'【480位】','480位',null,null,null], ['01:20',482,null,null,null,null,null], ['01:35',474,null,null,null,null,null], ['02:40',474,null,null,null,null,null], ['03:45',474,null,null,null,null,null], ['04:15',467,'【467位】','467位',null,null,null], ['04:20',451,null,null,null,null,null], ['05:25',451,null,null,null,null,null], ['06:30',451,null,null,null,null,null], ['06:45',451,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:441,max:500},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) } }); } });