Opened 16 years ago
Last modified 15 years ago
#4559 new enhancement
adding a query to retrieve labels
Reported by: | Owned by: | Martin Aspeli | |
---|---|---|---|
Priority: | high | Component: | GoogleChartPlugin |
Severity: | major | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Request
In order to retrieve the data, currently the paramter "query" (transformed into chd) is used, but this does not take any reference to the label.
The "query" parameter should be allowed to return two columns in its result set and forwarding the first one to chd and the second to chdl, so they are associated by the SQL query itself.
Example
- Query: SELECT COUNT(id) AS tickets, owner FROM ticket GROUP BY owner;
- Call: GChart(type="pie", chs="250x100", query="SELECT COUNT(id) AS tickets, owner FROM ticket GROUP BY owner;")?
This query turns out this (example) table:
tickets | owner |
27 | John Doe |
1 | Mastermind |
Which should create the attached chart.
Attachments (1)
Change History (4)
Changed 16 years ago by
comment:1 Changed 16 years ago by
- Call: [[GChart(type="pie", chs="250x100", query="SELECT COUNT(id) AS tickets, owner FROM ticket GROUP BY owner;")]]
comment:2 Changed 16 years ago by
Mmmm.... I think the plugin supports what you want via the column specifier. However, I can't remember the exact syntax right now. The idea is that you tell the plugin what each column in the result set is - labels, xdata, ydata and so on.
I wish I had more time to update the documentation and do proper release management, but right now, I don't. :-/
comment:3 Changed 15 years ago by
I'd also like to see this ability. I'm trying to graph the number of svn commits per user.
SELECT count(lower(author)) AS "Commits", lower(author) AS "Author" FROM revision group by lower(author) order by count(lower(author)) desc
example chart