PDA

View Full Version : Chart, no y-axis, blank?



MeeMMeeM
9 Mar 2010, 2:41 AM
Hi,

Warning I am a noob, so the answer may be something silly, but I can't find it after searching the forums.

- Extjs version: 3.1.1.
- Flash version: 10.0.45.2
- Browser: IE8 and FF 3.5.8

I am having trouble displaying a chart, I created a simple test case using an extjs example.





var yAxisSingle = new Ext.chart.Axis({
id: 'yAxisSingle',
title: '% Change'
});


var store = new Ext.data.JsonStore({
fields: ['name', 'visits', 'views'],
data: [
{ name: 'Jul 07', visits: 0.0245000, views: 3000000, type: 'float' },
{ name: 'Aug 07', visits: 0.0240000, views: 3500000 , type: 'float' },
{ name: 'Sep 07', visits: 0.0355000, views: 4000000 , type: 'float' },
{ name: 'Oct 07', visits: 0.0375000, views: 4200000, type: 'float' },
{ name: 'Nov 07', visits: 0.0490000, views: 4500000 , type: 'float' },
{ name: 'Dec 07', visits: 0.0495000, views: 5800000, type: 'float' },
{ name: 'Jan 08', visits: 0.0520000, views: 6000000 , type: 'float' },
{ name: 'Feb 08', visits: 0.0620000, views: 7500000 , type: 'float' }
]
});

var CentreGraph = new Ext.chart.LineChart({
id: 'CentreGraph',
store: store,
url: "../Common/ext/resources/charts.swf",
xField: 'name',
yField: 'visits',
listeners: {
itemclick: function(o){
var rec = store.getAt(o.index);
Ext.example.msg('Item Selected', 'You chose {0}.', rec.get('name'));
}
}
});



The x-axis is shown but y axis is blank and the chart itself is blank.

However, when I change one of the 'visit' values to be an integer the graph is displayed?!.

I've tried updating charts.swf from the YUI website, (to 2.8.0r4) but when I download the new .swf and replace the one in ..\ext\resources I get a no x or y axis, just a white background.

Any help would be greatly appreciated.

Kind regards

MeeMMeeM