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

WCF and Chart

1 Answer 135 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Kamil
Top achievements
Rank 1
Kamil asked on 02 Apr 2012, 11:19 AM
Hi!
Is it possible to get data from wcf service and than put it into chart? I know how to connect with wcf in javascrpit, and how to build chart in kendo, but I have no idea how to join it :(

Kamil

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 02 Apr 2012, 03:55 PM
Hello Kamil,

It is recommended to use the dataSource component in order to bind the chart to a remote service. The most important configuration settings are the transport and schema objects. The first one is responsible for loading of the data and its options are very similar to the one of the jQuery.ajax method. The second one is used to describe the raw data model. By default WCF services return Json in the following format { "d": <result> } , so you need to specify how the dataSource will get the result in the following way - data: "d".

This code library project explains in details how to connect KendoUI widgets (grid) to WCF service. Once you got the dataSource populated with records, you can follow one of the DataViz binding to remote data examples and set up your chart.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Kamil
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or