Forum - jschmidt-systemberatung.de

× php-RGraph and php-rgraph Joomla Content Plugin

SQL query into the RGraph commande?

  • yves
  • Topic Author
  • Visitor
  • Visitor
5 years 1 month ago #1162 by yves
Replied by yves on topic SQL query into the RGraph commande?
Hi Joachim,

thank you for your feedback, but I am still blocked.
Enclosed is a print screen which includes:
- on the left part: the content of the SQL table I have. So far the key columns are the "suivi_period" (the series of data), the "suivi_dimesnions" (the spokes), and the "suivi_score" (the values).
- then on the right part: I extracted in excel a dynamic matrix to regroup the periods/set of data and build the corresponding radar graph just under to whom what I would like to obtain.
- and at the bottom of the right part, I pasted the result I get with Graph connecting to the same SQL table and the corresponding code I used.
Where do I make a mistake in the code? Can you help me on that? (I still could see easily the corresponding code in your sample of the animated radar graph.

I enclose the print screen and the corresponding Excel table of my print screen in the zip file

kind regards
yves
Attachments:

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #1163 by jochen
Replied by jochen on topic SQL query into the RGraph commande?
hl,
data must be numeric - you can display/use non numeric only for "labels". According your sql, rgraph will use 5 values of "sulvi_dimensions" for labels and related "sulvi_score" for data - all other values are ignored as they are not numeric.  

Please Log in or Create an account to join the conversation.

  • yves
  • Topic Author
  • Visitor
  • Visitor
5 years 1 month ago #1164 by yves
Replied by yves on topic SQL query into the RGraph commande?
Hi Joachim,

Thanks. After transforming the "suivi_score" to numeric, I was able to display the last set of records in the table. :-)

Howerver, I still have some problems:
1°) How can I get several set of records on the same radar? I tried the option "accumulative" set to "true" (or also to "1", but it doesn't work.

2°) How can I define the value "key" based on a field of the database (in the present case, based on the value of the field "suivi_period", which would be like a group by result (and which is not numeric).

3°) how can I limit the results to certain number of records (based for instance on the field "suivi_mission_titre" if I cannot include those fields in the SQL as it is not numeric as well.

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #1165 by jochen
Replied by jochen on topic SQL query into the RGraph commande?
hi,

"key" should always be the "name" of data (e.g. the field-name). To group data coming from a database is a question of setting up your sql. E.g. check mySql for that.    

Please Log in or Create an account to join the conversation.

  • yves
  • Topic Author
  • Visitor
  • Visitor
5 years 1 month ago #1166 by yves
Replied by yves on topic SQL query into the RGraph commande?
HI Joachim,

Thank you for the info "key", I will try it.

About mySQL, yes I think I can use a group by, but I don't know how to indicate php-graph to plot several sets/groups of data.
I tried to add the option (accumulative="True") based on options indicated on the original Graph library, but it doesn't work.
Is it possible to get several set of data displayed on the same radar graph (assuming they have the same axes/spokes).

Thanks in advance
yves

Please Log in or Create an account to join the conversation.

Time to create page: 0.667 seconds
Powered by Kunena Forum
We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.