Publishing a chart from Google Docs should still work. It looks like the code you pasted above is *not* a "publish" script - it's a direct usage of the Javascript API. When using the Javascript API, one should adhere to the Javascript API documentation (which doesn't contain a hasLabelsColumn option). Can you please check the publish script itself?
On Fri, Oct 7, 2011 at 6:52 PM, eoionline <[email protected]> wrote: > If you looked at the script I pasted in the above, it is different > from Google's "Publish" script when working from google docs. As I > have all of my chart/graph data saved in Google docs, I can just > create the charts in the docs, click publish, copy the code and paste > it into the page - instead of defining each chart/graph as i did in > <head> tags. That way, when "they" (Google viz programmers and > engineers) update the release and add new configuration options (like > strictFirstColumnType), it will be more simple to make changes. > > On Oct 6, 10:09 am, Jinji <[email protected]> wrote: > > Can you please elaborate? > > What do you mean by "Publish script"? Who is "they" in "every time they > > release an update"? > > > > > > > > > > > > > > > > On Wed, Oct 5, 2011 at 10:48 PM, eoionline <[email protected]> wrote: > > > I see. Might be easier to simply embed Google's "Publish" script so I > > > don't have to make big changes every time they release an update... > > > > > Thanks to both of you for your help! > > > > > On Oct 5, 12:06 pm, Jinji <[email protected]> wrote: > > > > The hasLabelsColumn was an internal hack used by some Google products > to > > > > change chart behavior. In the last release we removed it, so it > caused > > > you > > > > these problems. I wonder where did you hear of this option. Anyway, > it's > > > no > > > > longer exist, so you can remove it from your code. > > > > > > On Wed, Oct 5, 2011 at 8:35 PM, asgallant <[email protected] > > > > > wrote: > > > > > Setting strictFirstColumnType = true for the bar, column, pie, > scatter, > > > > > combo (with bars), and candlestick charts enforces the rules on > data > > > type > > > > > for the first column. All of these charts specify a string value > in > > > the > > > > > first column, though they have worked with non-string values in the > > > past > > > > > (though this was undocumented and not officially supported). This > > > option > > > > > was introduced to allow developers to test their charts against the > new > > > > > requirements, which will require strict adherence to the spec. > Since > > > your > > > > > data returns a number for the first column, not a string, setting > this > > > > > option to true would cause the chart to fail. The way to get > around > > > the > > > > > problem with your data is to translate the first column into a > string > > > using > > > > > a DataView and then draw the chart using the view: > > > > > > > var view = new google.visualization.DataView(data); > > > > > view.setColumns([{ > > > > > calc: function(data, row) { > > > > > return data.getFormattedValue(row, 0); > > > > > }, > > > > > type:'string' > > > > > }, > > > > > 1, > > > > > 2 > > > > > ]); > > > > > chart.draw(view, <options>); > > > > > > > Incidentally, the displayAnnotations option is applicable to the > > > Annotated > > > > > Timeline charts only. I don't know where you are getting > > > > > the hasLabelsColumn option from, but it's not in any of the charts > > > insofar > > > > > as I am aware. > > > > > > > -- > > > > > You received this message because you are subscribed to the Google > > > Groups > > > > > "Google Visualization API" group. > > > > > To view this discussion on the web visit > > > > > > https://groups.google.com/d/msg/google-visualization-api/-/5ZF-Gjrq6-sJ > > > . > > > > > > > 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. > > -- > 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.
