Look in the javascript rendered by your server code (open the page, view
source). What outputs there?
On Wednesday, July 2, 2014 1:43:59 PM UTC-4, EricC wrote:
>
> It just shows a red box with "this.getLength is not a function" displayed
> in it versus the timeline. The same wrapper works for say the bar chart.
>
>
> On Wednesday, July 2, 2014 10:37:46 AM UTC-7, Andrew Gallant wrote:
>>
>> What does that output when you render the page? I would expect that you
>> would want to input the colors as an array in Java and the output should
>> handle converting the Java array to a javascript array.
>>
>> On Wednesday, July 2, 2014 9:12:33 AM UTC-4, EricC wrote:
>>>
>>> I have a project using gwt, smartgwt and the gwt visualization library.
>>>
>>> I created a new wrapper for the timeline chart that has worked well so
>>> far. However I have run into an issue when I try to set the colors option,
>>> namely instead of drawing the timeline I get a "this.getLength is not a
>>> function" error
>>>
>>> So for example I create an array of colors, one per timeline data entry:
>>>
>>> String colorsA[]
>>>
>>> Then try to create a JsArrayString and pass it to the wrapper class:
>>>
>>> colors.toArray(colorsA);
>>>
>>> JsArrayString arrayString=ArrayHelper.toJsArrayString(colorsA);
>>>
>>> opts.setColors(arrayString);
>>>
>>> where setColors is defined as:
>>>
>>> public final native void setColors(JsArrayString colors) /*-{
>>>
>>> this.colors = colors;
>>>
>>> }-*/;
>>>
>>> This works fine for other types of charts, e.g. a line chart.
>>>
>>> Any help would be appreciated.
>>>
>>
--
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.
For more options, visit https://groups.google.com/d/optout.