This is a migrated thread and some comments may be shown as answers.

Column Chart resolveColor() fails with 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'charAt'

1 Answer 164 Views
Charts
This is a migrated thread and some comments may be shown as answers.
John Thompson
Top achievements
Rank 2
John Thompson asked on 16 Aug 2013, 02:39 PM
When I use colorField: "Color" with named colors such as "Red", "Green" or "Yellow" in the data for a column chart the following error is thrown:

0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'charAt'.

The color names work as expected in a donut chart.

I fixed this in the resolveColor function by adding the line

value = new String(value);

just after setting the default.  In my case the color was passed from JSON data.  The kendo.DataViz version is 2013.2.716.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 20 Aug 2013, 11:40 AM
Hi,

Thanks for reporting this problem.
It is caused by a misbehaving series aggregate that returns the point color as array - ["Red"] instead of "Red".

Your solution gets around this in a very interesting way. The String constructor flattens the array exactly like ["Red"].join(",") would.

This problem is solved as part of other fixes for the string aggregates and shouldn't manifest itself in the latest internal builds.
Apologies for the caused inconvenience.

Regards,
T. Tsonev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
John Thompson
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Share this question
or