Trying to Pass Data Into Chart Query

More
7 years 2 months ago #6105 by Eugene Campbell
I have an Article that I have put in a drop down with some years in it as follows:

<p><select name="ChartYear" on-change="this.form.submit();"><option value="2018">2018</option><option value="2017">2017</option><option value="2016">2016</option><option value="2015">2015</option><option value="2014">2014</option><option value="2013">2013</option><option value="2012">2012</option></select></p>
<div style="width: 70px; display: block; vertical-align: bottom; margin: left; padding: 0px;"><form action="" method="POST">

I am using Chart Data Existing Database and have written my on SQL Query. In my query I have included {ChartYear} so that the WHERE statement will pull data for the selected year.

I then added a chart to the article using:

{vchartmodule 351}

With that said I load the article and get no chart. I have my dropdown but changing the value of the drop down has no effect on the chart in the article.

Can I please get your assistance.

Thanks,
-Eugene

Please Log in to join the conversation.

More
7 years 2 months ago - 7 years 2 months ago #6110 by Daniel
Hello,
Where did you get the {ChartYear} keyword from? There is no such keyword supported by vChart. You can put the request variables within curly braces in your database query, vChart will replace these keywords with the request values.

Thanks
Daniel
Last edit: 7 years 2 months ago by Daniel.

Please Log in to join the conversation.

More
7 years 2 months ago #6112 by Eugene Campbell
Daniel,

That variable comes from a dropdown that I placed in an article that also contains the chart. I figured that when the article is opened the value of the drop down would be used in the database query.

This is the code that was placed in the article:

<p><select name="ChartYear" on-change="this.form.submit();"><option value="2018">2018</option><option value="2017">2017</option><option value="2016">2016</option><option value="2015">2015</option><option value="2014">2014</option><option value="2013">2013</option><option value="2012">2012</option></select></p>
<div style="width: 70px; display: block; vertical-align: bottom; margin: left; padding: 0px;"><form action="" method="POST">

Please Log in to join the conversation.

More
7 years 2 months ago #6117 by Eugene Campbell
Checking to see if I can get an update.

Thanks,
-Eugene

Please Log in to join the conversation.

More
7 years 2 months ago #6118 by Daniel
Hello,
Please share your backend & FTP login credentials via Contact us form along with the page URL where you are displaying the chart. We'll look into it.

Thanks
Daniel

Please Log in to join the conversation.

More
7 years 2 months ago #6126 by Eugene Campbell
Daniel,

I sent the requested information via 'Contact Us'. The article that contains the charge and the dropdown is located under Reports --> General --> Chart Test under the main menu.

-Eugene

Please Log in to join the conversation.

Cron Job Starts