Opened 9 years ago

# adding a query to retrieve labels

Reported by: Owned by: tuebernickel@… Martin Aspeli high GoogleChartPlugin major 0.11

## 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

This query turns out this (example) table:

 tickets owner 27 John Doe 1 Mastermind

Which should create the attached chart.

example chart

### comment:1 in reply to:  description Changed 9 years ago by anonymous

• Call: [[GChart(type="pie", chs="250x100", query="SELECT COUNT(id) AS tickets, owner FROM ticket GROUP BY owner;")]]

### comment:2 Changed 9 years ago by anonymous

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 9 years ago by Geoff Jacobs

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


### Modify Ticket

Change Properties