Stacked charts weirdness

3 posts, 0 answers
  1. Milan
    Milan avatar
    2 posts
    Member since:
    Sep 2015

    Posted 05 Aug Link to this post

    Hi,

    I'm trying to create a stacked chart and i'm having trouble with the results - the stacked data is not a sum of all data points but rather an artificial number. I've made a dojo sample here http://dojo.telerik.com/EFIhUQ - the second column shoudl be 4 and it shows up as 120000... any idea why?

  2. Milan
    Milan avatar
    2 posts
    Member since:
    Sep 2015

    Posted 05 Aug in reply to Milan Link to this post

    Nevermind - i figured out that the problem was in the data representation - numeric versus string. quoted numbers somehow become represented as string values during stacking (remain numeric value without stacking). Might be a Kendo bug but an easy fix in the datasource is not to quote the numeric values.
  3. Kendo UI is VS 2017 Ready
  4. Daniel
    Admin
    Daniel avatar
    2118 posts

    Posted 09 Aug Link to this post

    Hello,

    The behavior is expected. The chart does not parse the values and the addition of string values is concatenation. Besides changing the values in the data you could also declare the field type in the dataSource model so that the values are parsed - updated example

    Regards,
    Daniel
    Telerik by Progress
     
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
     
Back to Top