PDA

View Full Version : Getting inifinity bar height/width in vertical/horizontal bar chart



silent
27 Oct 2011, 10:34 PM
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.


28932

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:



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!

alex999
28 Feb 2012, 12:21 AM
Hi,

have the same issue, did you get it working?

Regards

alex999
29 Feb 2012, 11:41 PM
Ok, figuered out what was not working:

I use YAML CSS framework. In file base.css (YAML core file) there is a declaration


/* (en) HTML5 - add missing styling in IE & old FF for hidden attribute */
/* (de) HTML5 - Eigenschaften für das hidden-Attribut in älteren IEs und FF nachrüsten */
[hidden] {
display: none;
}

This declaration causes the ExtJS parsing errors. Commenting that declaration is enough.