Sign in to follow this  
silviu.ciocianu

Dynamic Selection of Period

Recommended Posts

Hello everyone!

 

 

 

I've searched lots of posts and also the showcases but didn't find the solution to my problem yet.

 

 

 

First of all, I'll state that I have basic know-how about JS.

 

 

 

2nd is what I want to do: For a simple line chart i want to have the possibility to dynamically select the period for the charting. Like having a drop down menu under the graph with values like "Hourly","Daily","Weekly" and so on... and after this selection, in a list should appear all the values from the database corresponding to the type of period which was selected earlier. Next step would be selecting each hour / date / week and after that, charting. I've seen a part of the FC documentation where there are some statements using AJAX and I found a sort of a drop down.

 

 

 

Now my first problem is I can't manage to build it from a tutorial ... :| ... which is located here: http://www.devshed.com/c/a/MySQL/Loading-JavaScript-Arrays-with-MySQL-Data/

 

 

 

And the second one is if any of you has easier suggestions regarding this.

 

 

 

Looking forward to read your answers!

Share this post


Link to post
Share on other sites

Hi,

 

 

 

The chart does not directly support this.

 

But you can do this programatically using javaScript and server side scrpting.

 

 

 

The role of JavaScript would be to pick the value from a drop down combo - Weekly, hourly etc. and pass the value as a querystring to the setDataURL()'s url.

 

 

 

This URL would be a server side script which would, as per the value passed in querystring, buidl XML from database and pass it back to chart to show necessary data.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this