1 Attachment(s)
Getting inifinity bar height/width in vertical/horizontal bar chart
Hey guys,
I stumpled over an error which I cannot debug, because it's only a 'warning'. So I hope someone could help me.
I created a chart with bar series and added a store to it, all rendered fine. The only mistake that my bar series have, is that the x value of the bar series is 'infinity' (in vertical label orientation). This results in drawed chart with all the bars along the y axis.
Warnings in Firebug:
! Unexpected value Infinity parsing the attribute width.
return Function.prototype....ctor.apply(Function.prototype, args); ext-all-debug.js (Line 400)
! Unexpected value Infinity parsing the attribute width.
! Unexpected value Infinity parsing the attribute x.
The warnings in Firebug are translated by me, so it can differ to the original english translation of firebug.
My code for the chart:
Code:
Ext.create('Ext.chart.Chart', {
width: 1050,
height: 370,
animate: true,
theme: 'Red',
store: Ext.getStore('myStore'),
axes: [{
type: 'Category',
position: 'bottom',
fields: ['day'],
title: 'Last 10 days'
}, {
type: 'Numeric',
position: 'left',
fields: ['count'],
title: 'Login Count',
grid: true
}],
//Add Bar series.
series: [{
type: 'bar',
axis: 'bottom',
xField: 'day',
yField: 'count',
highlight: true,
label: {
display: 'insideEnd',
field: 'count',
orientation: 'vertical',
color: '#333',
'text-anchor': 'middle'
}
}]
});
Many thanks in advance!