View Full Version : chart from results page?
pmd339638
10-04-2010, 03:00 PM
Is it possible to set up a search page where the user selects the variables (say state and county), and send those variables to Dynamic Charts to create a chart? Example: select Calif. and Orange County. Hit submit. Chart would appear on results page where you would see sales by year just for Orange County, Calif.
I tried tinkering with the XML but it doesn't seem to like the variables. thanks.
Jason Byrnes
10-05-2010, 08:33 AM
yes this can be done.
how you go about it will depend on how complex the search is going to be.
will it just be the state? if so then you can create a search form with a submit button and a state form element. set the forms method to GET.
then when creating the chart, in the wizard, you can set the filtering section to filter the state on the URL perameter and enter the name of the state form element.
pmd339638
10-05-2010, 09:11 AM
Thanks much for your reply. I will be using two variables, such as state and county. Will I have to go into the XML then and add another URL parameter?
Jason Byrnes
10-05-2010, 09:19 AM
No, not in the xml, do this in the recordset.
in the dynamicwebcharts folder, there will be a file named <chartPageName>_data1.php, where <chartPageName> is the name of the page you added th;e chart to. the recordset that creates the chart will be on this page, Double click the recordset to edit it and add to the where clause. Examine how the first parameter was added to the where clause for an example on how to add the second one.
pmd339638
10-05-2010, 09:44 AM
Excellent. Thanks for the tips. This is a lot of help.
Jason Byrnes
10-05-2010, 11:09 AM
you're welcome.
vBulletin® v3.8.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.