A quick glance at the advpoll result theming ability seems to be limited.
The only remotely related issues raised before are #111774: Creating a tpl.php file and #194317: Integrate Open Flash Chart API.
Currently provided theme functions are
theme_advpoll_bar()
theme_advpoll_results()
theme_advpoll_voting_binary_form()
theme_advpoll_voting_ranking_form()
E.g. possible theming requirements (which ATM seemingly impossible)
- using other chart types such as pie, line, area chart other than bar chart
- integration with other charting libraries - Google Chart API, Open Flash Chart, etc
I think the problem resides in the $results passed to theme_advpoll_results(), which is already pre-rendered bar instead of data. This renders the theme function useless as there is nothing much on the chart you can change. The theme_advpoll_bar() is having the similar problem by taking in one choice data at a time, which will not work for other chart types.
Take binary vote as example, my suggestion is
- advpoll_view_results_binary() should return a result set
- theme_advpoll_results() take in the result set, which at some point call theme_advpoll_bar() for bar, and can be overrided to output other chart types or integrate with other charting API.
Does that make sense? =)
Comments
Comment #1
anders.fajerson commentedJust reading this quickly it does sound like it makes a lot of sense :)
Comment #2
pomliane commentedThis version of Advanced Poll is not supported anymore. The issue is closed for this reason.
Please upgrade to a supported version and feel free to reopen the issue on the new version if applicable.
This issue has been automagically closed by a script.