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

Stacked charts weirdness

2 Answers 26 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Milan
Top achievements
Rank 1
Milan asked on 05 Aug 2016, 12:46 PM

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 Answers, 1 is accepted

Sort by
0
Milan
Top achievements
Rank 1
answered on 05 Aug 2016, 03:33 PM
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.
0
Daniel
Telerik team
answered on 09 Aug 2016, 07:53 AM
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.
 
Tags
Charts
Asked by
Milan
Top achievements
Rank 1
Answers by
Milan
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or