Multi-column chart + year drop-down

More
08 Feb 2017 13:38 #3797 by Daniel
Replied by Daniel on topic Multi-column chart + year drop-down
Hello,
It is not implemented in Extra condition, You can use this in Custom Query only.

Thanks
Daniel

Please Log in to join the conversation.

  • Vladimir Kocic
  • Topic Author
  • Offline
  • New Member
  • New Member
More
08 Feb 2017 10:15 #3794 by Vladimir Kocic
Replied by Vladimir Kocic on topic Multi-column chart + year drop-down
I tried using the variable like this -> {chartYearStart} in the extra condition, like it is shown on the picture, but it doesn't work.

Please Log in to join the conversation.

More
08 Feb 2017 09:35 #3793 by Daniel
Replied by Daniel on topic Multi-column chart + year drop-down
Hello,
You can use all the get / post variables directly with the variable names enclosed in braces e.g. for userid you can use {userid}

Thanks
Daniel

Please Log in to join the conversation.

  • Vladimir Kocic
  • Topic Author
  • Offline
  • New Member
  • New Member
More
08 Feb 2017 08:12 - 08 Feb 2017 08:13 #3791 by Vladimir Kocic
Replied by Vladimir Kocic on topic Multi-column chart + year drop-down
No, I just need to know what dynamic variable I need to put into MYSQL query in order to get the value from the form selection in the front end.
With the other plug-in, I used {$REQUEST:chartYearStart|empty:'2017'}, what is the equivalent for your addon?
Last edit: 08 Feb 2017 08:13 by Vladimir Kocic.

Please Log in to join the conversation.

More
08 Feb 2017 06:06 #3787 by Daniel
Replied by Daniel on topic Multi-column chart + year drop-down
Hello,
Please contact our Sales team via Contact us form, We'll look into it.

Thanks
Daniel

Please Log in to join the conversation.

  • Vladimir Kocic
  • Topic Author
  • Offline
  • New Member
  • New Member
More
07 Feb 2017 14:48 #3780 by Vladimir Kocic
Multi-column chart + year drop-down was created by Vladimir Kocic
I need to create a chart like the one in the attachment.


The "Anno" selects the year, and based on that selection, the SQL query shows the data for that year.
This is the MYSQL query:
Code:
SELECT CONCAT(SUBSTRING(YEAR(datefield),3),'/',LPAD(MONTH(datefield),2,0)) AS Periodo, SUM(statistica_assunti_n.assunzioni) AS `Assunzioni`, SUM(statistica_licenziati_n.licenziamenti) AS `Licenziamenti` FROM calendar INNER JOIN statistica_assunti_n ON calendar.datefield = statistica_assunti_n.data_assunzioni INNER JOIN statistica_licenziati_n ON calendar.datefield = statistica_licenziati_n.data_licenziamenti WHERE YEAR(datefield) ={$REQUEST:chartYearStart|empty:'2017'} AND datefield <= DATE(NOW()) GROUP BY YEAR(datefield), MONTH(datefield) ORDER BY YEAR(datefield), MONTH(datefield)

On the front-view I placed this form into a joomla page:
Code:
{source}<div style="width: 70px; display: block; vertical-align: bottom;margin: left; padding: 0px; "><form action="" method="post"><select name="chartYearStart" on-change="this.form.submit();"><option value="2017">Anno</option><option value="2011">2011</option><option value="2012">2012</option><option value="2013">2013</option><option value="2014">2014</option><option value="2015">2015</option><option value="2016">2016</option><option value="2017">2017</option></select></form></div>{/source}

If you have a suggestion how to do it faster with your add-on, please tell me.

Please Log in to join the conversation.

Cron Job Starts