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

Best design for listview with chart generation?

1 Answer 38 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Per
Top achievements
Rank 1
Per asked on 23 Aug 2013, 12:18 PM
Hi!

I have a application with 2 views.
The first view contains a list of charts I can choose from.
When a user clicks on one of the rows in the list, the second view slides in and presents the chart.
All data is retreived from ONE json url. The data I get back from the json service contains all charts.

I been trying to figure out what's the best design for handling data retrival and ui interactions.
Shall I retrive all data when my application starts, and store it as a array?
Shall I retrived the chartsdata from the datasource, in the "OnClick" event, when the user clicks on a row?
Shall I create the chart in the OnClick event?

What is the best practice in this senario?

I'm greatfull for any answers :)

Regards
Per

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 26 Aug 2013, 01:59 PM
Hello,

Since you already have the data it would make most sense to create the charts in your "click" handler.
Check the "Binding to local data" examples for a syntax reference.

If you don't want to load all the data in advance then use a data source on each chart, as in the "Binding to remote data" demos. 
This will save you the trouble of sifting through the initial data, but will require dedicated service for each chart.

I hope this helps.

Regards,
T. Tsonev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
General Discussions
Asked by
Per
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or