PDA

View Full Version : Radar graph and models



iplanit
17 Sep 2012, 8:20 AM
Hi there,

Which is the best way to populate the data in a Radar Graph ?, I would like to update a Radar Graph everytime I click in an item.

Should be simple as there is many examples, but using Sencha Architect I find problems.

I can put the information (data) in the Model, say:

Computer has many features.

Should I create two stores ? one for Computer and one for Feature ? or I can put all the data nested into the Computer model ?

If I try the former, Sencha Architect complains with the message "Radar Graph has no store defined". And the application does not work.

But I cannot put that information into a store because it would be populated from the Computer module (that has many features) and this information is in the JSON from the Computer store.

It is a simple question, but the main problem is that I cannot make something similar to the examples from Sencha Architect now, otherwise I could play with it.

Regards

scottmartin
18 Sep 2012, 8:39 AM
Does this example help?
http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/charts/FormDashboard.html

You could use store.loadData() to populate the chart store each time you select an item.

Scott.

iplanit
18 Sep 2012, 8:43 AM
Correct.

But it is the way it works ? call load and then sync() ?

If I use loadData it works, when passing a harcoded array, If this is the way to do it is ok for me, but I am not 100% sure if the best way is that or I should create an association and then using the related models get the data for the chart.

I guess I have to use it like you say.

Thanks for the reply


Does this example help?
http://dev.sencha.com/deploy/ext-4.1.0-gpl/examples/charts/FormDashboard.html

You could use store.loadData() to populate the chart store each time you select an item.

Scott.