You have several options to handle this case. When the error is added and your handler is being called, you can decide according to the error message what is your preferred action. In addition, you can always remove the errors from the div by using the methods described in this section: http://code.google.com/apis/chart/interactive/docs/reference.html#errordisplay Notice that the error handler is getting the id of the error as one of the parameters.
Hope this helps, Viz Kid On Thu, Jan 26, 2012 at 8:02 PM, Martin <[email protected]> wrote: > I have a: > > var wrapper2 = new google.visualization.ChartWrapper({ > .... > dataSourceUrl: dataSourceURL, > query: 'select month(A), count(G) where G = \'USER_LOGIN\' > group by > month(A) pivot I order by month(A)', > containerId: 'chart_div2' > ...}); > > that fails when there is no data in the spreadsheet. > > I've setup: > google.visualization.events.addListener(wrapper2, 'error', > errorHandler); > > But this listener is called after there is an error message in the > chart_div2 > > Is there a way to do a handleQueryResponse and check for error on a > ChartWrapper so I can intercept the error generation? > > -- > 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.
