Hi, Unfortunately, there's no ideal solution i can offer you. You can do these manipulations in JavaScript (add a new column to the datatable, of type 'string' and copy the data to it). But if you use a gadget, you'll have to create a custom gadget in order for this to work.
It is in our feature request list to have better support for such scenarios. Regards, VizBoy. On Tue, Apr 28, 2009 at 7:06 PM, Scott G <[email protected]> wrote: > > Yes, thanks, that helps a lot. I saw the Headers setting that defaults > to Auto in the Edit prefs, and I tried setting it various ways, but I > never realized it meant "how many rows to skip." I thought is was > somehow saying which row to use as the labels for data points. > > I have a problem with that too, probably related to the 'not typed' > you mention. Even using the standard Line Chart gadget, I couldn't get > the Year to show up as a label on the x axis--it would show up as a > line of data, which of course messed up the chart. I eventually found > that if I set the line to be plain text, it would pick it up, but in > changing formats back and forth, somehow it ended up formatting my > Years with commas, and I'm still having a problem getting everything > to show up properly at the same time (I have some years with > footnotes, like "1990 [1]" so they are affected differently than years > like "1997"). > > Thanks > Scott > > > On Apr 28, 5:45 am, VizGuy <[email protected]> wrote: > > Please read the following page about Google Spreadsheets as a data > source: > http://code.google.com/apis/visualization/documentation/spreadsheets.... > > > > In general, your issues are not related to the GadgetHelper, but more to > the > > fact that Spreadsheet are not typed, and so there are some heuristics > that > > have to be done in order to analyze the data format, and if there are > header > > rows. > > Please read specifically about the header= parameter, that lets you > override > > the heuristics and explicitly tell the number of header rows from the > > selected cells range. > > > > Hope this helps. > > > > Regards, > > VizGuy > > > > On Sun, Apr 26, 2009 at 6:30 PM, Scott G <[email protected]> wrote: > > > > > I'm working on a spreadsheet gadget that will take some standard text > > > in a spreadsheet, format it and wrap it around a data chart. I'm > > > planning to use this on a blog (and make it available to others for > > > their blogs) and I think the easiest way to go is to create Google > > > Docs spreadsheets in a standard format, create my special gadget on > > > the spreadsheet, then get the publish script to embed it elsewhere. By > > > using createQueryFromPrefs I hope to avoid having to reference the > > > spreadsheet key explicitly in the XML, thereby avoiding having to > > > clone the XML for each distinct spreadsheet. > > > > > Here's the rub: it seems that the table I get from getDataTable starts > > > with the first numeric row of the table, skipping all the text rows > > > above it. I can't even get my header row, which is Years, unless I > > > format it as a number (which puts a , in the year, like 2,007). > > > > > The Range defined in the Edit section when I set up the gadget clearly > > > specifies A1:W20, but what I get back is A7:W20, where my actual data > > > starts (or if I make row 7 plain text, like I want to, I only get > > > A8:W20). Interestingly, I do get any text-only rows *after* the data > > > rows (so I could move my text rows lower, I assume, but that still > > > doesn't help the Year header row problem). Is this a special feature > > > of the GadgetHelper, to assist the visualization code? Is there some > > > way to turn it off, or at least ask for one text row before the > > > numeric rows? > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
