-
11 Apr 2012 9:50 AM #1
Answered: Confused with the Area documentation
Answered: Confused with the Area documentation
I was going to post a comment in the Area documentation, but figured here is more appropriate. http://docs.sencha.com/touch-charts/...rt.series.Area
Ext.chart.series.Area.png
Is it just me or is the data that is provided to the chart at the top seem a bit off?
According to the graph, the lines are depicting data1..5, but the data in the store seems like it should be showing a line for each "name". Also when you look at "data1" closely you realize the line looks nothing like the data says.Code:var store = new Ext.data.JsonStore({ fields: ['name', 'data1', 'data2', 'data3', 'data4', 'data5'], data: [ {'name':'metric one', 'data1':10, 'data2':12, 'data3':14, 'data4':8, 'data5':13}, {'name':'metric two', 'data1':7, 'data2':8, 'data3':16, 'data4':10, 'data5':3}, {'name':'metric three', 'data1':5, 'data2':2, 'data3':14, 'data4':12, 'data5':7}, {'name':'metric four', 'data1':2, 'data2':14, 'data3':6, 'data4':1, 'data5':23}, {'name':'metric five', 'data1':27, 'data2':38, 'data3':36, 'data4':13, 'data5':33} ] });
The first point of data1, according to the graph should be somewhere around 2 or 3. The first bit of data for data1 is 10.
Is anyone else confused about this thing? To me the graph doesn't look anything like I would expect it's data to be:
Seems more appropriate to me... There's one line called "data1" which would appear in the legend, and for each point on the bottom of the graph (with names "metric X") it has a value. Of course the values should match where the point should be too...Code:var store = new Ext.data.JsonStore({ fields: ['name', 'data1', 'data2', 'data3', 'data4', 'data5'], data: [ {'name':'data1', 'metric one':10, 'metric two':12, 'metric three':14, 'metric four':8, 'metric five':13}, ] });
-
Best Answer Posted by mitchellsimoens
Each record is a horizontal point not a line
-
11 Apr 2012 11:46 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3102
Each record is a horizontal point not a line
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.
-
11 Apr 2012 11:55 AM #3
That surprisingly helped, but the chart still looks a bit off compared to the data.
So "metric one" has data: 10, 12, 14, 8, 13
The chart has something around: 15, 12, 10, 6, 2... Of course this is rough estimates based on what I see on the left edge of the chart.
There's nothing below 8 in the data, the chart has 2 points that are clearly below 8.
-
11 Apr 2012 12:00 PM #4Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,582
- Vote Rating
- 433
- Answers
- 3102
That is hard for me to debate
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.


Reply With Quote