1) Here's a jsfiddle for the LineChart: http://jsfiddle.net/NVNh6/1/ I set useFirstColumnAsDomain: true to get the intended value. Note the dataSourceUrl has range specified in it to pick out the cells that have data in them.
Full docs for using Google Spreadsheets as a data source URL: https://developers.google.com/chart/interactive/docs/spreadsheets#Google_Spreadsheets_as_a_Data_Source 2) You can replace LineChart with ImageLineChart in the example I gave you, but it is not a 1:1 replacement. It does not support the "useFirstColumnAsDomain" option, so it will attempt to plot RPM as another series. Thomas Rybka | Software Engineer | [email protected] | Google Thomas Rybka | Software Engineer | [email protected] | GViz On Fri, Mar 22, 2013 at 5:51 AM, SJO <[email protected]> wrote: > Hi all > > Just started to take a look at the Google Charts API. I have a couple of > problems, if someone could clarify/solve please :- > > I've got some simple data in a google spreadsheet ( > https://docs.google.com/a/di.cx/spreadsheet/ccc?key=0Aq5ZGfoqCa6gdHZYelhoXzNIMkN0MWtiYkYyM0ZhQWc#gid=0 > ). > > Column B is what I want for my X axis. > Columns C+ are the series data. > > 1) I've got some sample code on the playground rendering this data in a > LineChart object. Works fine, however I can't figure out how to show the > X axis (RPM). I notice from the normal LineChart example, where you use > an array in the script, the first column (0) is used for the X axis. Could > someone please confirm if the Data Source Request method of populating a > LineChart object differs? If I specify column B (RPM) in my query, it > just shows it as series data and not the X axis. > > 2) Should I be able to directly replace LineChart with an ImageLineChart > object? > I appreciate the latter is not an official Google chart type. If I simple > substitute the object by name I get nothing in the output. I do not know > either if ImageLineChart is compatible with a Data Source Request? > > > If anyone could please clarify/demonstrate the above, that'd be fantastic. > > > Many thanks in advance :-) > > > -- > You received this message because you are subscribed to the Google Groups > "Google Visualization API" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to > [email protected]. > Visit this group at > http://groups.google.com/group/google-visualization-api?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
