PDA

View Full Version : [DUP] [4.1.0b2] Data scaling in a Line Chart broken if X axis numeric and data is offset



Curtis Fletcher
16 Feb 2012, 4:33 AM
In the below example, the data range is from 3 to 7 the series lines begin over the value of 6 on the X axis (between the tics for 5.8 and 6.2) if the range is changed to begin at 0 and end at 4 the series lines are plotted as expected. This happened in b1 as well.

Tested on Chrome 17 and Firefox 8.01


Ext.create("Ext.window.Window", { width:500,
height:500,
layout:"fit",
items:[
{
xtype:"chart",
store:{
proxy:{
type:"memory",
reader:{
type:"array"
}
},
model:Ext.define("MyModel", {
extend:"Ext.data.Model",
fields:[
{name: "time"},
{name: "data1"},
{name: "data2"},


]
}) && "MyModel",
data:[
[3,117717,1175616],
[4,105529.520000,1215088.000000],
[5,117817.280000,1338496.000000],
[6,118105.066667,1176072.000000],
[7,117947.680000,1168904.000000]
]
},
axes:[
{
type:"Numeric",
position:"left",
fields:["data1","data2"]
},
{
type:"Numeric",
position:"bottom",
fields:["time"]
}
],
series:[
{
type:"line",
axis:"left",
xField:"time",
yField:"data1",
},{
type:"line",
axis:"left",
xField:"time",
yField:"data2",
}
],
legend:{
position:"right"
}
}
]
}).show();

mitchellsimoens
16 Feb 2012, 4:56 AM
We will look into it.