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

DataSource and chart with special chars in fieldnames not working

1 Answer 65 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Andreas
Top achievements
Rank 1
Andreas asked on 29 Jan 2014, 10:04 AM
Hi,

I am using the latest version of Kendo DataViz: 2013.3.1324

If I use whitespace or - in my charts field names all I get is errors. For example, my data looks like this (Chome log of datasource):

19: ct.extend.init
20: ct.extend.init
Bandwidth IN: 8.9
Bandwidth Out: 3.96
_events: Object
err-line: 30
name: 1390908600000
parent: function (){return r}
uid: "eb22f21c-41b7-47de-af24-8f4a86aa4a58"
__proto__: i


I get this error:

ReferenceError: line is not defined
at eval (eval at <anonymous> (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:9:28980), <anonymous>:3:15)
at g (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:15:31102)
at fn.extend._bindFromObject (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:16:18853)
at fn.extend.bindPoint (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:16:18380)


If I change err-line to errline I get this error:

SyntaxError: Unexpected identifier
at Function (native)
at ht.getter (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:9:28980)
at g (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:15:31086)
at fn.extend._bindFromObject (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:16:18853)
at fn.extend.bindPoint (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:16:18380)
at Object.an._bindPoints (http://192.168.99.30/kendo-2013.3.1324/js/kendo.dataviz.min.js:19:19572)


If I remove any other data except errline, the chart draws.

Is it possible to get a fix for this?



1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 31 Jan 2014, 07:59 AM
Hello Andreas,

This behavior is expected, since the Chart only supports field names that are valid JavaScript identifiers.

Regards,
Alexander Popov
Telerik

Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

Tags
Charts
Asked by
Andreas
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or