How to debug JavaScript errors happening in corechart itself?

Skip to first unread message


May 9, 2011, 11:25:52 PM5/9/11
Hi all,
I've started to use the Visualization API with GWT, and so far it's
working great, it's really nice. I'm adding a ColumnChart to my
application, pretty much like I did for the PieChart (which works like
a charm), but the ColumnChart is triggering a JavaScript error inside
corechart itself:

Error: a.Ha[b] is undefined
Source File:,corechart.I.js
Line: 662

This is my GWT code:

private void renderLatencyHistogram(final
ESResponse.Facets<ESResponse.HistoFacet> facets) {
if (facets == null) {
final DataTable data = DataTable.create();
data.addColumn(DataTable.ColumnType.NUMBER, "Latency");
data.addColumn(DataTable.ColumnType.NUMBER, "Number of hits");
final JsArray<ESResponse.HistoFacet> buckets = facets.terms();
final int nbuckets = buckets.length();
for (int i = 0; i < nbuckets; i++) {
final ESResponse.HistoFacet facet = buckets.get(i);
data.setValue(i, 0, facet.key());
data.setValue(i, 1, facet.count());
final Options options = ColumnChart.createOptions();
options.setTitle("Response Latency");
final AxisOptions axis = AxisOptions.create();
charts.add(new ColumnChart(data, options));

It's the last line, that calls "new ColumnChart", that triggers the
JavaScript error above.

I spend a couple hours trying to find how to get the AjaxLoader to
load the non-minified version of corechart, so I could get a
meaningful error instead of "a.Ha[b] is undefined", but I haven't been
successful. How am I supposed to make sense of this error and fix it?

In Firebug, I see:
Code being executed: function(b){return{N:this.Kb(b),text:a.Ha[b][D]}},this)}
N = "right"
b = 250
a.Ha = []
D = "title"

The attributes in `a' are:
sc width height tc S dc Eb xi $l Id Fi Kd Wc Ci sb Ld Zr $r title Hd
Ie Nd ui Tc og Ha m ce Qb hh Xc orientation Uc j b

Attributes with their values:
sc=function () { return a[Fc](c, arguments); } width=400 height=240
tc= S=function dc=Arial Eb=11 xi=bars $l=[object Object] Id=datum
Fi=single Kd=[object Object] Wc=[object Object] Ci=[object Object]
sb=[object Object] Ld=#ffffff Zr=[object Object] $r=[object Object]
title=[object Object] Hd=out Ie=out Nd=false ui=false Tc=false
og=false Ha= m=[object Object],[object Object] ce=[object
Object],[object Object] Qb=[object Object] hh=0 Xc=false
orientation=horizontal Uc=false j=[object Object] b=[object Object]

Environment: GWT 2.2.0 with gwt-visualization-1.1.1.jar, Firefox
3.6.16 on Mac OS X 10.6.7, running in GWT Development Mode (which
doesn't complain about anything, this error only shows up in Firefox's
error console).


Benoit "tsuna" Sigoure
Software Engineer @


Jun 15, 2012, 10:48:20 AM6/15/12
Did you figure this out? I'm having a similar problem.
Reply all
Reply to author
0 new messages