Interchange Axis

More
7 years 9 months ago #5154 by Julien Camus
Hello,

Working on a Column Chart.

Right now, I have on the horizontal axis the names of schools, and on the vertical parameter, how many students they signed up.

I would like to do the opposite. Names of schools on the vertical axis (listed one under the other).

How can I do that?

Initalial query with list of schools at the bottom:

SELECT q.provider_name AS name, count(r.id) AS n
FROM #__admincrm_programs as p
LEFT JOIN #__admincrm_versions as v ON(v.programs_id=p.id)
LEFT JOIN #__admincrm_sessions as s ON(s.versions_id=v.id)
LEFT JOIN #__admincrm_providers as q ON(s.providers_id=q.id)
LEFT JOIN #__admincrm_enrollments AS e ON(e.sessions_id=s.id)
LEFT JOIN #__admincrm_results AS r ON(r.enrollments_id=e.id)
WHERE p.id IN(2,7,16,17) AND s.session_format='Classroom' AND YEAR(r.date_event)='2017'
GROUP BY q.id ORDER BY n DESC;

Tried to achieve what I wanted with this query:

SELECT count(r.id) AS n , q.provider_name AS name
FROM #__admincrm_programs as p
LEFT JOIN #__admincrm_versions as v ON(v.programs_id=p.id)
LEFT JOIN #__admincrm_sessions as s ON(s.versions_id=v.id)
LEFT JOIN #__admincrm_providers as q ON(s.providers_id=q.id)
LEFT JOIN #__admincrm_enrollments AS e ON(e.sessions_id=s.id)
LEFT JOIN #__admincrm_results AS r ON(r.enrollments_id=e.id)
WHERE p.id IN(2,7,16,17) AND s.session_format='Classroom' AND YEAR(r.date_event)='2017'
GROUP BY q.id;

Not sure what I am getting wrong.

Thanks!

Julien

Please Log in to join the conversation.

More
7 years 9 months ago #5155 by Daniel
Replied by Daniel on topic Interchange Axis
Hello,
There is an option in formatting section to change the orientation. Please set it to Vertical.

Thanks
Daniel

Please Log in to join the conversation.

More
7 years 9 months ago #5157 by Julien Camus
Replied by Julien Camus on topic Interchange Axis
Cool! Thanks! Had not realized it was that simple. Also, at the end of each bar, is there an option to display the actual value for the bar without having to go over the bar with the mouse?

Please Log in to join the conversation.

More
7 years 9 months ago #5159 by Daniel
Replied by Daniel on topic Interchange Axis
Hello,
In case of Database, the option isn't available. It's available for Manual Input only.

Thanks
Daniel

Please Log in to join the conversation.

Cron Job Starts