JavaScript
function convertInt(value){
if(typeof value !== 'number') // or other similar conversion
return undefined;
return value;
}
var chartDataStore = Ext.create("Ext.data.ArrayStore", {
storeId: "chartData",
fields: [
{ name: "year", type: "integer" },
"country1",
{ name: "value1", type: "integer", convert: convertInt },
"country2",
{ name: "value2", type: "integer", convert: convertInt }
],
data: [
[1997,"USA",66,"Canada", null],
[1998,"USA",81, "Canada", null],
[1999,"USA",83,"Canada",46],
[2000,"USA",61,"Canada",45],
[2001,"USA",null,"Canada",53],
[2002,"USA",null,"Canada",43]
]
});
var win = Ext.create("Ext.chart.Chart", {
width: 600,
height: 400,
hidden: false,
title: "Example working chart",
renderTo: "demoChart",
layout: "fit",
style: "background:#fff",
animate: true,
store: chartDataStore,
shadow: true,
theme: "Category1",
legend: {
position: "bottom"
},
axes: [{
type: "Numeric",
minimum: 0,
position: "left",
fields: ["value1", "value2"],
title: "Value",
grid: {
odd: {
opacity: 1,
fill: "#ddd",
stroke: "#bbb",
"stroke-width": 0.5
}
}
}, {
type: "Category",
position: "bottom",
fields: ["year"],
title: "Year"
}],
series: [{
type: "line",
highlight: {
size: 7,
radius: 7
...