How to Add multiple Value Axis and Series from JSON

2 posts, 0 answers
  1. Vimal
    Vimal avatar
    2 posts
    Member since:
    Nov 2011

    Posted 18 Sep 2013 Link to this post

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

    Posted 20 Sep 2013 Link to this post

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