PDA

View Full Version : [FIXED] Stacked Bar Chart Sample problems



keltnerj
26 Feb 2011, 7:23 AM
The Stacked Bar Chart Sample (http://dev.sencha.com/deploy/ext-4.0-pr2/examples/charts/StackedBar.html) has some problems: 1) the Year labels are in reverse order to the data, 2005 is actually 2008, etc.; 2) the bars as drawn do not match the data (38.91M plots as ~42M).

Jamie Avins
26 Feb 2011, 8:02 AM
1) isn't a bug. The axis ascends from the bottom. 2) this is a problem we're looking into.

keltnerj
26 Feb 2011, 8:36 AM
Re problem #1:

According to the View Source link (http://dev.sencha.com/deploy/ext-4.0-pr2/examples/charts/StackedBar.js), the data in the store are:

var store = new Ext.data.JsonStore({
fields: ['year', 'comedy', 'action', 'drama', 'thriller'],
data: [
{year: 2005, comedy: 34000000, action: 23890000, drama: 18450000, thriller: 20060000},
{year: 2006, comedy: 56703000, action: 38900000, drama: 12650000, thriller: 21000000},
{year: 2007, comedy: 42100000, action: 50410000, drama: 25780000, thriller: 23040000},
{year: 2008, comedy: 38910000, action: 56070000, drama: 24810000, thriller: 26940000}
]
});

According to the store, Comedy for 2005 is 34M; but according to the chart, Comedy for 2005 is 38.91M, etc.

Seana
1 Mar 2011, 1:59 PM
Re problem #1:

According to the View Source link (http://dev.sencha.com/deploy/ext-4.0-pr2/examples/charts/StackedBar.js), the data in the store are:

var store = new Ext.data.JsonStore({
fields: ['year', 'comedy', 'action', 'drama', 'thriller'],
data: [
{year: 2005, comedy: 34000000, action: 23890000, drama: 18450000, thriller: 20060000},
{year: 2006, comedy: 56703000, action: 38900000, drama: 12650000, thriller: 21000000},
{year: 2007, comedy: 42100000, action: 50410000, drama: 25780000, thriller: 23040000},
{year: 2008, comedy: 38910000, action: 56070000, drama: 24810000, thriller: 26940000}
]
});

According to the store, Comedy for 2005 is 34M; but according to the chart, Comedy for 2005 is 38.91M, etc.

I'm seeing the same behavior.

data: [
{year: 2005, comedy: 34000000, action: 23890000, drama: 18450000, thriller: 20060000},
{year: 2006, comedy: 56703000, action: 38900000, drama: 12650000, thriller: 21000000},
{year: 2007, comedy: 42100000, action: 50410000, drama: 25780000, thriller: 23040000},
{year: 2008, comedy: 38910000, action: 56070000, drama: 24810000, thriller: 26940000}
]

it looks almost like the ordering of the axis is only ascending, the rest looks to still be descending.

IE:

data: [
{year: 2008, comedy: 34000000, action: 23890000, drama: 18450000, thriller: 20060000},
{year: 2007, comedy: 56703000, action: 38900000, drama: 12650000, thriller: 21000000},
{year: 2006, comedy: 42100000, action: 50410000, drama: 25780000, thriller: 23040000},
{year: 2005, comedy: 38910000, action: 56070000, drama: 24810000, thriller: 26940000}
]

tomearly
4 Mar 2011, 4:25 AM
Hi, I have download pre-release version 3 and this is still an issue.

I using the following data and have exactly the same problem (i.e. the labels are in reverse order)

Has the problem been identified and is a fix being worked on?

[var store = new Ext.data.JsonStore({ fields: ['name','High','Highest','Major'], data: [ { name: "00", High: 38,Highest: 1,Major: 2}, { name: "01", High: 13,Highest: 0,Major: 0}, { name: "02", High: 12,Highest: 5,Major: 2}, { name: "03", High: 13,Highest: 2,Major: 0}, { name: "04", High: 4,Highest: 1,Major: 0}, { name: "05", High: 4,Highest: 1,Major: 0}, { name: "06", High: 2,Highest: 1,Major: 0}, { name: "07", High: 2,Highest: 0,Major: 0}, { name: "08", High: 10,Highest: 0,Major: 0}, { name: "09", High: 4,Highest: 1,Major: 0}, { name: "10", High: 757,Highest: 167,Major: 14}, { name: "11", High: 88,Highest: 0,Major: 66}, { name: "12", High: 11,Highest: 1,Major: 0}, { name: "13", High: 44,Highest: 3,Major: 1}, { name: "14", High: 20,Highest: 0,Major: 0}, { name: "15", High: 14,Highest: 1,Major: 0}, { name: "16", High: 9,Highest: 1,Major: 0}, { name: "17", High: 7,Highest: 0,Major: 0}, { name: "18", High: 24,Highest: 0,Major: 0}, { name: "19", High: 7,Highest: 0,Major: 0}, { name: "20", High: 11,Highest: 0,Major: 0}, { name: "21", High: 14,Highest: 0,Major: 0}, { name: "22", High: 5,Highest: 0,Major: 0}, { name: "23", High: 5,Highest: 0,Major: 2} ] });

Jamie Avins
4 Mar 2011, 8:08 AM
Still open as the thread states.

garydp16
10 Mar 2011, 2:03 PM
One other item with stacked bar/column charts. If you add a "maximum" value, say 200,000,000 for the movies example, the bars still fill out to far end of the chart instead of stopping at it's value.

evant
10 Mar 2011, 5:50 PM
The issue with the ordering has been corrected.

@garydp16

Please open a new thread with a short test case. Thanks.