PDA

View Full Version : EXT Line chart : One of the axes values are cut



funnyfox
21 Oct 2012, 11:33 PM
Hi I am developing a line chart for my application.

One of my line series is getting cut because of huge value.
How can I avoid this .?

Here is the image of the graph. The value at 5/12 is 180,000.
39508

Here is my code


me.myChart= Ext.create('Ext.chart.Chart', {
renderTo: Ext.getBody(),
width: 1000,
height: 400,
animate: true,
store: store,
padding :'0 0 0 0',
legend: {
position: 'bottom',
},
axes: [
{
type: 'Numeric',
position: 'left',
fields: ['totalActiveMonthly','totalExpenseAmount','expenseAmount'],
title: 'Active Monthly',
label: {
renderer: Ext.util.Format.numberRenderer('0,0')
},
grid: true,
minimum: 0
},
{
type: 'Category',
position: 'bottom',
fields: ['monthForExpense'],
label: {
renderer: dateRenderer1
},
title: 'Month'
}
],
series: [
{
type: 'line',
axis: 'left',
fill: true,
highlight: {
size: 7,
radius: 7
},
xField: 'monthForExpense',
yField: 'totalActiveMonthly',
markerConfig: {
type: 'cross',
size: 4,
radius: 4,
'stroke-width': 0
}
},{
type: 'line',
axis: 'left',
fill: true,
highlight: {
size: 7,
radius: 7
},
xField: 'monthForExpense',
yField: 'activeMonthly',
markerConfig: {
type: 'triangle',
size: 4,
radius: 4,
'stroke-width': 0
}
},
{
type: 'line',
highlight: {
size: 30,
radius: 30
},
axis: 'left',
fill: true,
xField: 'monthForExpense',
yField: 'totalExpenseAmount',
markerConfig: {
type: 'circle',
size: 4,
radius: 4,
'stroke-width': 0
}
}
]
});

scottmartin
22 Oct 2012, 8:46 AM
Can you specify the version of Ext4 that you are using? I do not see this behavior:
http://jsfiddle.net/ddWrQ/

Scott.

funnyfox
22 Oct 2012, 10:24 AM
My Bad. I gave duplicated in the fields

fields: ['totalActiveMonthly','totalExpenseAmount','expenseAmount'],

totalExpenseAmount and expenseAmount both are same. That is the mistake.

Moderators Please Mark this as Answered