Merci à nos donateurs:
M. Blanc
M. JavierMartinez
M. Viktor
M.
Emanuel Roggen
M. Raphaël
Chochon
M. José
Luis Sanchez
M. Daniel Stuyck
M. Jean-Pierre
Tonnele
M. Benoist Lerouge
M. Pierre Sabatier
M. Patrick Ollivier
M. Michel Le
Viol
M. César
López
M. Didier Mestric
M. Francesco
Paolo Trapani
M. Charles Durand
M.
Philippe Blanchard
M. Benjamin
Leblic
Philippe Dupertuys
M. Jaume Mas
Ferrer
M. Daniel Lavocat
M. Jean-Pierre
Bernard
M.Gérard Egger
M. Jean-Claude
Birade
M. Dominique
Herraire
M. Eric Lemoine
M. Jean Gabriel
Boulet
M. Olivier Bovel
M. Arnaud Rahier
M. Bruno Goyac
M. Jean Michel
Vouillot
M. Sarah Cordeau
M. Jean-Pierre
Grieu
M. Loic Roulin
M. Michel Beel
M. Dominique
Gautheron
M. Hubert Verwilghen
Picardie WebMarketing
M. Patrick Puydebois
M. Thierry Hauuy
M. Francis Mirante
Visiteurs depuis le 07.01.2010
Visites du jour :
Tutoriel MySQL
- Highstock
Chart with multiple axes
To plot a graph of various different data such as
the
temperature, humidity and pressure, the graph will be easier to
read if we put several axes.
As this graph that we create
You already know the principle,
note that we have selected five values,
and date
<?php //Call script command to login require("mysql_connect.php"); // The date and time of the last record is retriev $sql="select max(tstamp) from data"; $query=mysql_query($sql); $list=mysql_fetch_array($query);
// Determines the stop and start on the way to retrieve the next request // data last xx heures
$stop=$list[0]; $start=$stop-(86400);
// Retrieves data from the past 48 hours in ascending order of date and time
$sql = "SELECT tstamp, outdoortemperature, dewpoint, instantrain, sealevelpressure, outdoorhumidity
FROM data where tstamp >= '$start' and tstamp <= '$stop' ORDER BY 1";
$query=mysql_query($sql); $i=0; while ($list = mysql_fetch_assoc($query)) { if (date("I",time())==0) { $dtime[$i]=($list['tstamp']+3600)*1000; } else { $dtime[$i]=($list['tstamp']+7200)*1000; }
Now let's define our 4 axis Y, Why only 4, if we have 5 values
to plot?
Simply because the temperature and the dew point will be on the
same axis in ° C
So for the first axis' temperature
and dew point ", we have:
You may have noticed that
there are two new instructions,
min: 980 This sets the minimum scale at 980 hPa in this example
opposite: true; this statement places the scale as opposed to the
default level, that is, to the right of the graph
Let's turn markers off in
the general settings of the chart, this will prevent them for each
series.
It also adds to the party, a time (animation): 3 seconds to draw
lines on the graph; is in milliseconds.
Attention, les données météo publiées
sur ce site sont issues d'une station météo personnelle
et ne sont données qu'à titre indicatif,
elles ne peuvent en aucun cas être utilisées pour garantir
la protection des personnes ou de biens quelconques.
Stations amies
MySQL - Highcharts page n°7
Chart with multiple axes.