如何修改Google图表?
您好,我刚刚意识到我的Google图表,但我想修改它。
- 我想更改日期显示,我想要更可读的内容。
- 我喜欢扭转
- 我喜欢 /10风速的
图表,您能帮我吗? 谢谢。
态
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(graph24h);
function graph24h() {
var data = google.visualization.arrayToDataTable([
['Date', 'Température', 'Vent Moyen', 'Humidité'],
<?php
$chartQuery = "SELECT * FROM ZiMeteo ORDER BY ID DESC LIMIT 144";
$chartQueryRecords = mysqli_query($connect, $chartQuery);
while ($row = mysqli_fetch_assoc($chartQueryRecords)) {
echo "['".$row['Date']."',".$row['TmpExt'].",".$row['Vents'].",".$row['HumExt']."],";
}
?>
]);
var options = {
title: 'Evolution sur 24 h',
legend: { position: 'bottom' }
};
var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
chart.draw(data, options);
}
Hello i just realised my google chart but i'd like to modify it.
- i'd like to change the date display i would like something more readable.
- i d like to reverse the chart
- i d like to /10 wind speed
Can you help me ?
Thanks.
<script type="text/javascript">
google.charts.load('current', {'packages':['corechart']});
google.charts.setOnLoadCallback(graph24h);
function graph24h() {
var data = google.visualization.arrayToDataTable([
['Date', 'Température', 'Vent Moyen', 'Humidité'],
<?php
$chartQuery = "SELECT * FROM ZiMeteo ORDER BY ID DESC LIMIT 144";
$chartQueryRecords = mysqli_query($connect, $chartQuery);
while ($row = mysqli_fetch_assoc($chartQueryRecords)) {
echo "['".$row['Date']."',".$row['TmpExt'].",".$row['Vents'].",".$row['HumExt']."],";
}
?>
]);
var options = {
title: 'Evolution sur 24 h',
legend: { position: 'bottom' }
};
var chart = new google.visualization.LineChart(document.getElementById('curve_chart'));
chart.draw(data, options);
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现问题2的答案:
在haxis中,我只需要将值修改为-1即可。
i find answer for question 2 :
in the hAxis i just have to modifiy the value to -1.