PDA

View Full Version : values not rendered in line chart, if xField is not given in extjs 4.1



manikumar
18 Nov 2012, 10:58 PM
I have problem in line chart in extjs 4.1.0. when upgraded to ext js 4.1.0 from 4.0.2a values not rendered in line chart, if xField is not given but in extjs 4.02a, values are rendered if xField is not given. here is code that is working in extjs 4.0.2a:


xtype: 'chart',
height: 120,
id: 'accounts-per-day-chart',
insetPadding: 5,
store: 'CustomersStore',
flex: 5,
series: [
{
type: 'line',
highlight: true,
yField: [
'Customers'
],
fill: true,

selectionTolerance: 5
}
],
axes: [
{
type: 'Numeric',
dashSize: 2,
fields: [
'Customers'
],
majorTickSteps: 0,
position: 'left',
decimals: 0,
minimum: 0
}
]
}


is xField mandatory in extjs 4.1.0? please suggest solution to render values in line chart with out declaring value for xField

ealbers
21 May 2013, 6:01 AM
I have a large set of data, and it needs to be plotted with the X axis being range 1-8, there is no way to put the X range INTO the data store, that would not make sense, since the fields of the store are being plotted against the 1-8 in X...

So how do I set xfield to a fixed range say 1-8? I can't make a column in the data called xrange and just fill it with repeating 1,2,3,4,5,6,7,8,1,2,3,4....., the line graph shows werid stuff
Thanks
Eric