Changing data source

2 posts, 0 answers
  1. Olli
    Olli avatar
    5 posts
    Member since:
    Mar 2013

    Posted 02 Apr 2013 Link to this post

    I have JSON from which I create a chart. In JSON, I've got array of objects, each object containing several arrays of numeric values and some other properties like:

    "rows": [
      {
       "handling": [8616.2759999999998, 7095.1799999999994, 6916.5359999999991],
    "name": "XXX",
    "weight": [13.388057013625801, 27.4987252294945, 3.9746104136942266],
    "color": "#265A6A",
    "data": [2872.0920000000001, 2365.0599999999999, 2305.5120000000002],
    },
    { ..}
    ]

    In createChart() function I can set to

    series: data.rows

    and the chart is created with "data" values from each object from "rows" array. How can I change the data source from objects "data" array to some other (e.g. "weight")?

  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2622 posts

    Posted 04 Apr 2013 Link to this post

    Hi Olli,

    I am not quite sure if I understand your scenario correctly. Could you please share more detailed information about how the chart is fed with data or better yet provide a jsFiddle / jsBin example which demonstrates your current implementation? Thank you in advance for your time.
     
    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top