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

How to Add multiple Value Axis and Series from JSON

1 Answer 83 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Vimal
Top achievements
Rank 1
Vimal asked on 18 Sep 2013, 10:55 PM
Hi ,

We are getting a JSON object ( sample attached ) and wants to create the multiple value Axes and Series from this JSON object for a line chart in Javascript file.

We want to somehow access the chart object and will like to programming in API manner .
Something like this .

chart.option.(addvalueaxis1) -- set it all properties like line color/alighment/name etc.
chart.option.(addvalueaxis2) -- set it all properties like line color/alighment/name etc.
chart.option.(addvalueaxis3)-- set it all properties like line color/alighment/name etc.

chart.option.(addseries1) -- set it all properties like title/valueField/valueAxis
chart.option.(addseries2) -- set it all properties like title/valueField/valueAxis
chart.option.(addseries3)-- set it all properties like title/valueField/valueAxis

CategoryAxis is date type returned in JSON object .

The Json object send the data for all days in the year.
We will pick the RPM value for day1,day2,day3 based on our calculation , in attached json object for day1 it will be ( FY14_Bing_RPM_ActualMetricValue, FY13_Bing_RPM_ActualMetricValue). Here RPM will become our first value axis. these values will form the first series.

The attached JSON object has array of 4 days.
can you please help.

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 20 Sep 2013, 03:26 PM
Hi,

There's no public API to construct the series and you need to build them through configuration.

var config = { series: [] };
config.series.push({ field: "xxx" })

$("#chart").kendoChart(config);


That said, we're considering exposing a public API.
I hope this helps.

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
Vimal
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or