Our company must monitore the temperature (T°) and humidity (H°) levels in our storage rooms. We have 5 sensors to do this. Each sensor send the current T° and H° 1 time per minute to our web server (we already have a PHP page running to retreive and store these values in a MySQL database).
We now need another PHP page to display these values as a SWF chart.
We found this free library to do this : PHP/SWF Chart ([url removed, login to view]).
Your job :
- Use the values stored in our MySQL database to build 2 nice looking line charts (1 for T°, 1 for H°).
- Program several options .
So this is a very simple and easy job, but we need it to be done EXACTLY as following :
In the file attached [url removed, login to view], you will see the kind of chart that we need.
- In this example, this is the chart for T° (celcius degres). The chart for H° would have the same look.
- X axis shows the time line
- Y axis shows the recorded values
- On the right side are the names of our sensors ("Réfrigérateur" is the French for "Refrigerator", and "Congélateur" is the French for "Freezer"). Here, it is on the right side, but you can put this anywhere you want.
- We need to have a "mouse over" display of the values, just like the dark-blue line at the bottom of this example. When the mouse pointer is over a section of the line, a pop-over field must display the name of the sensor, the time and the T°/H° recorded at this time.
- Sometimes, the values of our sensors are not recorded (web server timeout, internet connection down, or another reason). You can see that on the same dark-blue in this example, from 10:00AM to 10:05AM (there is a blank section because of a server timeout). We need the same thing : when 2 consecutive values have more than 5 minutes of difference, the dots should not be connected, so we can see that there are missing values.
Options we need :
(you can create another table on db to store these options, no problem)
- 1 option related to X axis, like "Display charts for the values of the last 6 hours", "… 2 days", "… from 2012-07-01 07:00:00 to 2012-07-30 06:59:59".
- 1 option to define the same thing by default (at the page opening).
- 1 option for the T° chart to define the min/max values of the Y axis.
- 1 option for the H° chart to define the min/max values of the Y axis.
- 1 option to define the colors by default for the line of each sensor (must be dynamic: if we add some other sensors in the futur, this option should be automaticaly available for them).
- 1 set of options to define in pixels the width and heigh of the charts, including an automatic scaling option based on the size of the user's browser window.
In the PHP code, you will have to define 1 variable per chart setting, so we can change them easily (examples : $x_axis_color, $y_axis_color, $chart_bg_color, $grid_color, $top_border_thickness, $bottom_border_thickness etc.)
You can find a sample of our database in the file attached.
- As you can see, the time of last recroded value of sensor Stock_1 can be at 07:18:38, and the time for the Stock_2 can be 07:18:29. The charts must take care of these differences of minutes and seconds, in order to put the dots of each line on the chart exactly where they should be.
- In the table "th_log", the column "sensor_type" defines the type of the value : T° or H°.
1=T° and 3=H°. So, sensor_type=1 values should be used for the T° chart, and sensor_type=3 values should be used for the H° chart.
As you can see, the same sensor_id can give only the T°, or both the T° and H°. Beware of that.
Décerné à :
5 freelance font une offre moyenne de $526 pour ce travail
We checked your posting in detail and based on that we are ready to do work as per your budget and timing and we are ready to discuss the things with you