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

Changing data source

1 Answer 33 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Olli
Top achievements
Rank 1
Olli asked on 02 Apr 2013, 09:36 AM
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")?

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 04 Apr 2013, 08:55 AM
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!
Tags
Charts
Asked by
Olli
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Share this question
or