PDA

View Full Version : Problem is Chart



progi2007
29 Sep 2009, 11:34 PM
If the chart I have the following figures: 0.08, 0.17, 0.17, 0.17. That chart does not show.

30 Sep 2009, 2:56 AM
Good to know. how about posting some your code (using code tags) so we can help debug?!

progi2007
30 Sep 2009, 5:05 AM
$chartJs = "new function(){
this.settings = ".Zend_Json_Encoder::encode($params['settings']['defaultEl']).";
this.profitDataStore = new Ext.data.JsonStore({
url: '/webmaster/default/webmaster/get-profit/',
storeId: 'profitDataStore',
root: 'results',
fields:['date', 'profit']
});

this.chart = new Ext.Panel({
iconCls:'chart',
layout:'fit',
width:'100%',
items: {
xtype: 'linechart',
height:300,
disableCaching:true,
store: this.profitDataStore,
url: '/images/ext3/charts.swf',
xField: 'date',
yField: 'profit',
yAxis: new Ext.chart.NumericAxis({
stackingEnabled: true,
title: '".$symbol."',
labelRenderer: Ext.util.Format.numberRenderer('0,0')
}),
xAxis: new Ext.chart.CategoryAxis({
}),
tipRenderer : function(chart, record){
return Ext.util.Format.number(record.data.profit + ' ".$symbol."') + ' ?????????? ?? ' + record.data.date;
}
,listeners: {
'beforeshow': function(chart) {

if (chart.store.getCount() == 0) {
Ext.get(chart.findParentByType('panel').getId()).insertHtml('beforeBegin', '<h2>No data</h2>');
chart.hide();
}
}
}
}
});
this.profitDataStore.load({params:{settings: this.settings}});
return this.chart;
}";

1 Oct 2009, 10:14 AM
yeah, how about the 'rendered' javascript then?

mitchellsimoens
7 Oct 2009, 5:13 PM
I had values that were under 0.3 and to get the axis to display it I had to set the majorUnit to something like 0.02 and then they appeared

Mag_42
9 Oct 2009, 6:03 AM
I had this problem too.. but I upgraded to the Yui 2.8 charts and it was fixed.. due to this line in the release notes i guess

* Fixed bug in which small numbers were not calculated correctly.