Line Chart value's not like I want them to be

pspunabletohack

Well-Known Member
OP
Member
Joined
Sep 11, 2010
Messages
355
Trophies
1
Age
26
XP
357
Country
Belgium
Hello,

First of all I'm creating a Line Chart with the Google Charts Visualization API and I'm using a MYSQL database.

In total I have two RPI's each of them have a UID, the first one has the value of '1' and the second one the value of '2'.

The RPI's collect temperature data and feed it to the database. After the data is collected I want to show tha data in a chart. The problem is I wrote a program in PHP to do that but the value's displayed isn't pricesely what I want so I think there is a small fault in my code, but I can't seem to find it.

The Values that actually should be inserted in the chart are:

{"cols":[{"label":"datetime","type":"datetime"},{"label":"RPI1","type":"number"},{"label":"RPI2","type":"number"}],"rows":[{"c":[{"v":"Date(2016, 11, 10, 15, 17, 3)"},{"v":"15"},{"v":"22"}]},{"c":[{"v":"Date(2016, 11, 12, 15, 17, 3)"},{"v":"27"},{"v":"25"}]}]}

I hope someone can help me?

Thanks in advance anyhow! :)

EDIT: the UID '3' shown in my database is ignored.

PHP File

5MGYCgu.png
 
Last edited by pspunabletohack,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    LeoTCK @ LeoTCK: yes for nearly a month i was officially a wanted fugitive, until yesterday when it ended