Graph 如何从google图表中获取所有值?

Graph 如何从google图表中获取所有值?,graph,charts,google-visualization,Graph,Charts,Google Visualization,最大输入值不会显示在图形上。 如何获得图表上从00:10:01到23:59:01的完整数据? 另外,谷歌图表中的最大值是多少 *谷歌图表代码 <html> <head> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript">

最大输入值不会显示在图形上。 如何获得图表上从00:10:01到23:59:01的完整数据? 另外,谷歌图表中的最大值是多少

*谷歌图表代码

<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() {
        var data = google.visualization.arrayToDataTable(%(ddata)s)
        var options = {
          title: 'CPU',
          dataOpacity : 0.0,
          explorer : { actions : 'dragToZoom' },
          fontSize : 10,
          hAxis: {title: 'Year',  titleTextStyle: {color: '#333'},
                logScale: true, textStyle: { color : 'red' }, textPosition: 'out', title: 'new', viewWindow : { max : 100 }
        },
          legend : {alignment:'end'},
        tooltip: {trigger:'selection'},
        trendlines: { 0: { color: 'green'}},
        vAxis: { title : 'using CPU(%%)', gridlines: {color : 'blue'}}
        };
        var chart = new google.visualization.AreaChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="chart_div" style="width: 100%%; height: 500px;"></div>
  </body>
</html>



#Read the file with Python code and save it to the list(%(ddata)s)

%(ddata)s =
1 20170628 00:10:01 all 0.38 0.00 0.23 0.20 99.19
2 20170628 00:20:02 all 0.51 0.00 0.20 0.28 99.01
3 20170628 00:30:01 all 0.72 0.00 0.65 0.17 98.46
...(omit)
496 20170628 23:57:01 all 0.13 0.00 0.03 0.10 99.74
497 20170628 23:58:01 all 1.00 0.00 0.27 0.16 98.57
498 20170628 23:59:01 all 1.92 0.00 1.99 0.16 95.93

total: 498 line

load('current',{'packages':['corechart']});
google.charts.setOnLoadCallback(drawChart);
函数绘图图(){
var data=google.visualization.arrayToDataTable(%(ddata)s)
变量选项={
标题:“CPU”,
数据不透明度:0.0,
资源管理器:{actions:'dragToZoom'},
尺寸:10,
哈克斯:{title:'Year',titleTextStyle:{color:'#333'},
logScale:true,textStyle:{color:'red'},textPosition:'out',title:'new',viewWindow:{max:100}
},
图例:{对齐:'end'},
工具提示:{触发器:'selection'},
趋势线:{0:{color:'green'}},
变量:{title:'usingcpu(%)',网格线:{color:'blue'}
};
var chart=new google.visualization.AreaChart(document.getElementById('chart_div'));
图表绘制(数据、选项);
}
#使用Python代码读取文件并将其保存到列表中(%(ddata)s)
%(ddata)s=
1 20170628 00:10:01所有0.38 0.00 0.23 0.20 99.19
2 20170628 00:20:02全部0.51 0.00 0.20 0.28 99.01
3 20170628 00:30:01全部0.72 0.00 0.65 0.17 98.46
…(省略)
496 20170628 23:57:01全部0.13 0.00 0.03 0.10 99.74
497 20170628 23:58:01全部1.00 0.00 0.27 0.16 98.57
498 20170628 23:59:01全部1.92 0.00 1.99 0.16 95.93
总数:498行
删除选项-->
hAxis.viewWindow:{max:100}

viewWindow
控制轴的起点(
min
)和终点(
max

min
max
的值应与轴列的数据类型匹配
在本例中,什么是
“日期”

因此
100
将其丢弃,删除该选项将允许轴

要完全显示

谢谢您的帮助:)