PDA

View Full Version : [CLOSED][3.??] LineChart logarithmic bug with zero



EloB
2 Oct 2009, 4:26 AM
Hi!

I found a rendering bug in ext.chart.linechart when using scale: 'logarithmic'. This happends if you change the any yField to zero in the store.

Try this!
Change any row (either views, listed or both) on the data variable to zero to see the rendering bug.


<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Extjs</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="extjs/css/ext-all.css" />
</head>

<body>
<script type="text/javascript" src="extjs/ext-base.js"></script>
<script type="text/javascript" src="extjs/ext-all.js"></script>
<script type="text/javascript">
<!--
(function() {
var data = [
{ date: '2009-01-01', views: 5, listed: 10 },
{ date: '2009-01-02', views: 3, listed: 13 },
{ date: '2009-01-03', views: 6, listed: 12 },
{ date: '2009-01-04', views: 7, listed: 16 },
{ date: '2009-01-05', views: 9, listed: 14 },
{ date: '2009-01-06', views: 8, listed: 12 },
{ date: '2009-01-07', views: 5, listed: 20 },
{ date: '2009-01-08', views: 4, listed: 11 },
{ date: '2009-01-09', views: 6, listed: 16 },
{ date: '2009-01-10', views: 5, listed: 14 },
{ date: '2009-01-11', views: 7, listed: 13 },
{ date: '2009-01-12', views: 9, listed: 1 },
{ date: '2009-01-13', views: 10, listed: 321239 },
{ date: '2009-01-14', views: 13, listed: 20 },
{ date: '2009-01-15', views: 11, listed: 22 },
{ date: '2009-01-16', views: 9, listed: 21 },
{ date: '2009-01-17', views: 10, listed: 5 }
];

var store = new Ext.data.JsonStore({
fields: [
{ name: 'date', type: 'date', dateFormat: 'Y-m-d' },
{ name: 'views' },
{ name: 'listed' }
],
data: data
});

new Ext.Viewport({
layout: 'fit',
items: new Ext.Panel({
title: 'Diagram',
items: new Ext.chart.LineChart({
store: store,
xField: 'date',
xAxis: new Ext.chart.TimeAxis({
labelRenderer : Ext.util.Format.dateRenderer('j F Y'),
majorTimeUnit: 'day'
}),
yAxis: new Ext.chart.NumericAxis({
scale: 'logarithmic'
}),
series: [
{
yField: 'views',
displayName: 'Visningar'
},
{
yField: 'listed',
displayName: 'Listnigar'
}
]
})
})
});
})();
-->
</script>
</body>
</html>

EloB
5 Oct 2009, 5:46 AM
Didnt anyone understand this bug?

Condor
5 Oct 2009, 6:11 AM
This is a bug in the YUI Chart SWF itself (see known issues (http://developer.yahoo.com/yui/charts/#knownissues)).

evant
5 Oct 2009, 2:27 PM
As Condor suggested, it's a known issue with the charts. Going to mark this issue as closed, since we're waiting on the issue to get fixed.