× Support forum for php-RGraph and php-rgraph content plugin for Joomla

SQL query into the RGraph commande?

1 Monat 2 Wochen her #1166 von yves
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

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

1 Monat 2 Wochen her #1165 von jochen
jochen antwortete auf 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.    

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

1 Monat 2 Wochen her #1164 von yves
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.

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

1 Monat 2 Wochen her #1163 von jochen
jochen antwortete auf 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.  

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

1 Monat 2 Wochen her #1162 von yves
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
Anhänge:

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

1 Monat 2 Wochen her - 1 Monat 2 Wochen her #1161 von jochen
jochen antwortete auf SQL query into the RGraph commande?
hi,

pls. see my example of displaying a radar chart. Labels will be used on the spokes (axes) of radar chart, data will be used to to be displayed in chart.
e.g. with "sql Select title, hits From jos_content Order By hits Desc Limit 10"
you will have 10 spokes (axes), labels wull be used from colum 1 ("title"), data comes from column 2 ("hits"). So chart-parms would be (as an example):
{rgraph title="Most Read Articles" width="600" height="300" grouping="stacked" tooltip="#label#
#val# Hits" data="database" sql="Select title, hits From jos_content Order By hits Desc Limit 10"
variant="3d" textAngle="20" gutterBottom="105" gutterLeft="85" tooltipsEvent="onmousemove"}cvs{/rgraph}    

Bitte Anmelden oder Registrieren um der Konversation beizutreten.

Ladezeit der Seite: 0.129 Sekunden
Powered by Kunena Forum

Besucher

Heute: 8
Gestern: 22
Diese Woche: 62
Letzte Woche: 103
Dieser Monat: 434
Letzter Monat: 610
0142283
United States 36,0% USA
Germany 13,0% Deutschland
Russia 4,5% Russland
France 3,2% Frankreich
Italy 2,6% Italien
Indonesia 2,6% Indonesien
India 2,4% Indien
Poland 2,3% Polen

Total:

203

Länder
Cookies erleichtern die Bereitstellung unserer Dienste. Mit der Nutzung unserer Dienste erklären Sie sich damit einverstanden, dass wir Cookies verwenden.
Ok