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 3 months ago #1156 by yves
Hi,

Can you please provide an example of using a SQL query to populate a RGraph commande in an article?
(I can also inject php/script code in articles or modules using the "RegularLabs" plugins).
If the example can be with a radar graph, the better!
thanks in advance
yves

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

More
5 years 3 months ago #1157 by jochen

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

  • yves
  • Topic Author
  • Visitor
  • Visitor
5 years 3 months ago #1158 by yves
Replied by yves on topic SQL query into the RGraph commande?
Thank you Jochen.
despite the example you sent and the days I spent previously, I cannot get it working.
So I think I will stop digging even if it looks of interest.
(too complex to try to add all the pieces of the configuration in place, like the various environment and configurations files, and then too complex to try to get a clear example  for the types of graph I want to use).

Regards
yves

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

  • yves
  • Topic Author
  • Visitor
  • Visitor
5 years 1 month ago #1159 by yves
Replied by yves on topic SQL query into the RGraph commande?
Dear Jochen,

I come back you. based on your example, I tried again and made some progress... but still I have difficulties to configure the radar based on an SQL query. 
So far I have been able to draw a radar graph with the axes coming from the sql database, but I don't know how to display the different series and labels of the series. can you please help me with the format because I don't find how to connect those variables to the data of the database? and I couldn't find an example of using the options of the radar graph in the examples on your website.
For instance I have the following fields -in the table jos_radar:
1. suivi_dimensions = axes of the radar2. suivi_period = identification of the data series3. suivi_score = value to plot on the radar for a data series for an axis4. suivi_mission_titre = general title of the graph5. suivi_mentor =  a where option (where the Mentor is XXXXX)

could you please give an example of using the radar graph in a web article? (if not can you please tell me where I can find a corresponding example radar+ sql at the same time)
Thanks in advance?
yves

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

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

I come back to you about my previous message. As indicated I was able to connect the database to the radar graph to display the various axes of the radar, but I really don't know how to address (I couldn't find any documentation on those aspects):
1) the series of data effectively (how to get a set of data displayed on the axes of the radar?);
2) the various options of your radar graph (for instance what is the variable/how to link it to a value of the database? (may be provide some example, and is there a specific order to respect in calling the fields in the sql query for the radar?)
3) to build the various series of data on the radar (not only one set/polygon of data and to connect the corresponding labels of those polygones into the legend of the radar).
thanks in advance
yves

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

More
5 years 1 month ago - 5 years 1 month ago #1161 by jochen
Replied by jochen on topic 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}    
Last edit: 5 years 1 month ago by jochen.

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

Time to create page: 0.135 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.