2013.3 Breaks 2013.2 Charts in MVC

5 posts, 0 answers
  1. Ian
    Ian avatar
    73 posts
    Member since:
    Jun 2013

    Posted 23 Jul 2013 Link to this post

    I have a simple set of charts that are in Windows working great under 2013.2. I upgraded to 2013.3 and now the Windows appears and the chart's X and Y axis, legend and labels on the axis appear, but the data is not rendered, the charts are empty. See attached image. It was working fine in 2013.2 but after I ran the 2013.3 update it stopped working. In the html output, the data is there serialized in json, it's just the lines and bars of the chart no longer appear.

    I have experimented by removing as much of the settings for a chart and window as I can, but still, no data appears.

            .Title("% Return")
            .Series(series =>
                    series.Column(model => model.Metrics.Return)
            .ValueAxis(axis => axis.Numeric())
            .CategoryAxis(axis => axis.Date().Categories(model => model.Observation))

    Here's the data Kendo's MVC wrapper writes to HTML:

    <div class="k-chart" id="chartPCT"></div><script>
        jQuery(function(){jQuery("#chartPCT").kendoChart({"title":{"text":"% Return"},"series":[{"name":"Month","type":"column","field":"Metrics.Return"}],"categoryAxis":[{"type":"Date","categories":["2013/01/31 00:00:00","2013/02/28 00:00:00","2013/03/31 00:00:00","2013/04/30 00:00:00","2013/05/31 00:00:00"]}],"dataSource":{"schema":{"model":{"fields":{"Granularity":{"type":"number"},"GranularityName":{"editable":false,"type":"string"},"Observation":{"type":"date"},"ObservationDescription":{"type":"string"},"IsTimeSeries":{"type":"boolean"},"Metrics":{"type":"object"},"ObservationDisplay":{"editable":false,"type":"string"}}}},"data":[{"Granularity":0,"GranularityName":"Monthly","Observation":"\/Date(1359619200000)\/","ObservationDescription":null,"IsTimeSeries":true,"Metrics":{"MarketValue":370505.870000,"NetInvested":494.280000,"Return":2.740981,"HasMarketValue":true,"HasNetInvested":true},"ObservationDisplay":"January"},{"Granularity":0,"GranularityName":"Monthly","Observation":"\/Date(1362038400000)\/","ObservationDescription":null,"IsTimeSeries":true,"Metrics":{"MarketValue":373901.670000,"NetInvested":284.740000,"Return":0.839149,"HasMarketValue":true,"HasNetInvested":true},"ObservationDisplay":"February"},{"Granularity":0,"GranularityName":"Monthly","Observation":"\/Date(1364713200000)\/","ObservationDescription":null,"IsTimeSeries":true,"Metrics":{"MarketValue":370930.070000,"NetInvested":0.000000,"Return":-0.794754,"HasMarketValue":true,"HasNetInvested":true},"ObservationDisplay":"March"},{"Granularity":0,"GranularityName":"Monthly","Observation":"\/Date(1367305200000)\/","ObservationDescription":null,"IsTimeSeries":true,"Metrics":{"MarketValue":361961.050000,"NetInvested":0.000000,"Return":-2.417981,"HasMarketValue":true,"HasNetInvested":true},"ObservationDisplay":"April"},{"Granularity":0,"GranularityName":"Monthly","Observation":"\/Date(1369983600000)\/","ObservationDescription":null,"IsTimeSeries":true,"Metrics":{"MarketValue":368352.560000,"NetInvested":0.000000,"Return":1.765800,"HasMarketValue":true,"HasNetInvested":true},"ObservationDisplay":"May"}]}});});
        jQuery(function(){jQuery("#window_Monthly").kendoWindow({"modal":true,"iframe":false,"draggable":true,"pinned":false,"title":"Monthly Performance - Account ","resizable":false,"content":null,"width":680,"height":430,"actions":["Close"]});});

  2. Ian
    Ian avatar
    73 posts
    Member since:
    Jun 2013

    Posted 23 Jul 2013 Link to this post

    I've tried putting in a chart that has its data included manually in the Series() and that works.

    It appears that the problem might be with a MVC server bound-to-model issue?

    I have tried moving the chart out of a window and placing it on the page directly and the same error occurs, no data is rendered.

    I've tried the RenderAs as well but no change.

    Again, it all was working with 2013.2, after an update to 2013.3 the charts started failing.

  3. Ian
    Ian avatar
    73 posts
    Member since:
    Jun 2013

    Posted 23 Jul 2013 Link to this post

    More info as the day goes on.....

    The chart does render the x and y labels correctly from the bound data so it is seeing the data, just not rendering the actual lines or bars or columns.
  4. Ian
    Ian avatar
    73 posts
    Member since:
    Jun 2013

    Posted 23 Jul 2013 Link to this post

    I think it is a Kendo bug in 2013.3

    I have found if I remove the following 2013.2 working code:

    .CategoryAxis(axis => axis
        .MajorGridLines(builder => builder.Visible(false))
    .Categories(model => model.Observation)
        .Labels(labels => labels.Format(mktValFormatter)
    and replace with the simplified code below it works. Attempts to use the .Date() and formatters cause the chart to not render the data:

    .CategoryAxis(axis => axis.MajorGridLines(builder => builder.Visible(false))
    .Categories(model => model.ObservationDisplay)
        .Labels(builder => builder.Rotation(mrkValRotation)))

  5. T. Tsonev
    T. Tsonev avatar
    2834 posts

    Posted 24 Jul 2013 Link to this post


    Thank you for reporting this problem. We have identified the root cause: series aggregates do not produce results for compound fields (xxx.yyy).

    We're working on a solution for the upcoming SP release and internal builds.

    Apologies for the caused inconvenience.

    T. Tsonev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top