dtex-lab
7 Jul 2010, 7:39 AM
Hi
I have a line chart with 2 series.
In the store I have this situation:
new Ext.data.JsonStore({
fields:['name', 'games', 'music'],
data: [
{name:'Jul 07', games: 245, music:700},
{name:'Aug 07', games: 240, music:550},
{name:'Sep 07', music:615},
{name:'Oct 07', games: 375, music:460},
{name:'Nov 07', games: 490, music:625}
]
As you can see for Sep 07 I haven't the value for games...
But the chart rappresent it as "0" so I can see in the chart that there isn't a "direct" line from Aug 07 to Oct 07 (because the value is missing...) but instead I see Aug 07 / 240 -- Sep 07 / 0 -- Oct 07 / 375
Get a look also to the screenshot maybe to understand better what I ask...
Red Lines are my wish... connecting Aug 07 to Oct 07 to skip Set 07 missing value
There is a way to "skip" missing value ?
this is a full test case
Ext.onReady(function () {
var store = new Ext.data.JsonStore({
fields: ['name', 'games', 'music'],
data: [{
name: 'Jul 07',
games: 245,
music: 700
},
{
name: 'Aug 07',
games: 240,
music: 550
},
{
name: 'Sep 07',
games: 355,
music: 615
},
{
name: 'Oct 07',
games: 375,
music: 460
},
{
name: 'Nov 07',
games: 490,
music: 625
}]
});
var store2 = new Ext.data.JsonStore({
fields: ['name', 'games', 'music'],
data: [{
name: 'Jul 07',
games: 245,
music: 700
},
{
name: 'Aug 07',
games: 240,
music: 550
},
{
name: 'Sep 07',
music: 615
},
{
name: 'Oct 07',
games: 375,
music: 460
},
{
name: 'Nov 07',
games: 490,
music: 625
}]
});
var vChart = new Ext.chart.LineChart({
height: 300,
width: 300,
store: store,
xField: 'name',
yAxis: new Ext.chart.NumericAxis({
displayName: 'games'
}),
series: [{
type: 'line',
displayName: 'Games',
yField: 'games'
},
{
type: 'line',
displayName: 'Cd\'s',
yField: 'music'
}]
});
var vChart2 = new Ext.chart.LineChart({
height: 300,
width: 300,
store: store2,
xField: 'name',
yAxis: new Ext.chart.NumericAxis({
displayName: 'games'
}),
series: [{
type: 'line',
displayName: 'Games',
yField: 'games'
},
{
type: 'line',
displayName: 'Cd\'s',
yField: 'music'
}]
});
// extra extra simple
var vPanel = new Ext.Panel({
region: 'center',
layout: 'form',
items: [vChart, vChart2]
});
var vView = new Ext.Viewport({
layout: 'border',
items: [vPanel]
});
})
ty
I have a line chart with 2 series.
In the store I have this situation:
new Ext.data.JsonStore({
fields:['name', 'games', 'music'],
data: [
{name:'Jul 07', games: 245, music:700},
{name:'Aug 07', games: 240, music:550},
{name:'Sep 07', music:615},
{name:'Oct 07', games: 375, music:460},
{name:'Nov 07', games: 490, music:625}
]
As you can see for Sep 07 I haven't the value for games...
But the chart rappresent it as "0" so I can see in the chart that there isn't a "direct" line from Aug 07 to Oct 07 (because the value is missing...) but instead I see Aug 07 / 240 -- Sep 07 / 0 -- Oct 07 / 375
Get a look also to the screenshot maybe to understand better what I ask...
Red Lines are my wish... connecting Aug 07 to Oct 07 to skip Set 07 missing value
There is a way to "skip" missing value ?
this is a full test case
Ext.onReady(function () {
var store = new Ext.data.JsonStore({
fields: ['name', 'games', 'music'],
data: [{
name: 'Jul 07',
games: 245,
music: 700
},
{
name: 'Aug 07',
games: 240,
music: 550
},
{
name: 'Sep 07',
games: 355,
music: 615
},
{
name: 'Oct 07',
games: 375,
music: 460
},
{
name: 'Nov 07',
games: 490,
music: 625
}]
});
var store2 = new Ext.data.JsonStore({
fields: ['name', 'games', 'music'],
data: [{
name: 'Jul 07',
games: 245,
music: 700
},
{
name: 'Aug 07',
games: 240,
music: 550
},
{
name: 'Sep 07',
music: 615
},
{
name: 'Oct 07',
games: 375,
music: 460
},
{
name: 'Nov 07',
games: 490,
music: 625
}]
});
var vChart = new Ext.chart.LineChart({
height: 300,
width: 300,
store: store,
xField: 'name',
yAxis: new Ext.chart.NumericAxis({
displayName: 'games'
}),
series: [{
type: 'line',
displayName: 'Games',
yField: 'games'
},
{
type: 'line',
displayName: 'Cd\'s',
yField: 'music'
}]
});
var vChart2 = new Ext.chart.LineChart({
height: 300,
width: 300,
store: store2,
xField: 'name',
yAxis: new Ext.chart.NumericAxis({
displayName: 'games'
}),
series: [{
type: 'line',
displayName: 'Games',
yField: 'games'
},
{
type: 'line',
displayName: 'Cd\'s',
yField: 'music'
}]
});
// extra extra simple
var vPanel = new Ext.Panel({
region: 'center',
layout: 'form',
items: [vChart, vChart2]
});
var vView = new Ext.Viewport({
layout: 'border',
items: [vPanel]
});
})
ty