Try a to wrap the result DataTable with a DataView that transforms the first column into a string of your choice. See here: http://code.google.com/apis/chart/interactive/docs/reference.html#DataView_setColumns
On Fri, Jul 15, 2011 at 1:25 PM, mikew <[email protected]> wrote: > I can't seem to figure how to query a flat table into a matrix for > e.g. a column chart. Here's the example: > > Let's take a google spreadsheet with deliveries showing the date, type > of product and amount delivered: > > DATE | PRODUCT | AMOUNT > Jan-1 | Bananas | 10 > Jan-1 | Apples | 5 > Jan-1 | Oranges | 7 > Jan-2 | Bananas | 5 > Jan-3 | Banana | 7 > Jan-3 | Oranges | 3 > > What is the query that gives me the following table: > > Bananas Apples Oranges > January 15 5 10 > February ... ... ... > ... > > I think the query should be: select month(A), sum(C) group by A pivot > B > > However, this results in a chart displaying month(a) as one of the > data columns (since month is a number I assume) and NOT as labels for > the x-axis. > > How can I get it to: > > a) display month as Jan, Feb, Mar, ... instead of 0, 1, 2, ... > > and finally > > b) to display them as labels on the x-axis > > Thanks for any help! > mike > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-visualization-api?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
