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

2 posts, 0 answers
  1. John Thompson
    John Thompson avatar
    44 posts
    Member since:
    Dec 2009

    Posted 16 Aug 2013 Link to this post

    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.
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2831 posts

    Posted 20 Aug 2013 Link to this post

    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!
Back to Top