-
15 Dec 2011 1:50 AM #1
Unanswered: Dynamic json chart
Unanswered: Dynamic json chart
I'm trying to use Sencha Touch Charts with a JSONStore to dynamically display a chart from information provided by JSON, series and data. This was possible with ExtJS 3 with the metaData property.
How can I accomplish the same with Sencha Touch Charts?
-
15 Dec 2011 10:20 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
Load the store outside the chart and when the store loads, create the chart.
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
18 Dec 2011 9:26 AM #3
I'm sorry but I can't get it to work. A simple example would be nice.
I wan't someting like this to produce a chart, none of the fields (except timestamp) can be hardcoded because it needs to be fullt dynamic.
Code:{ "metaData": { "root": "series", "fields": [{ "name": "timestamp" }, { "name": "Unit 1", "mapping": 2345 }, { "name": "Unit 2", "mapping": 5647 }, { "name": "Unit 3", "mapping": 1436 }] }, "series": [{ "timestamp": "Jan", "1436": 10, "5647": 6, "2345": 4 }, { "timestamp": "Feb", "2345": 10, "1436": 9, "5647": 7 }, { "timestamp": "Mar", "2345": 10, "5647": 7, "1436": 4 }] }
-
22 Mar 2012 8:33 PM #4
What if i want the labels also to be dynamic not hard coded?
How do i refresh and reload the data. Say i reload the store with new data. How do i rerender the chart.
-
23 Mar 2012 4:35 AM #5Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 34,121
- Vote Rating
- 453
- Answers
- 3160
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
2 Aug 2012 10:59 PM #6
@simon i am afraid then when a store calls a loadData the chart is refreshed but it does not update the series in the charts and so if we have added a new data or field in the store then the chart does not reflect this change is only redraws or refreshes the chart with same old store data..
i tries this with sencha 4.0.1 charts and also on touch chars
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote
