I upgraded a Touch app from 2.2 to 2.4 and without any code changes I am receiving the following error from chart.series.ItemPublisher when dynamically setting an array of Line Series into a Cartesian chart:


Code:



Uncaught TypeError: Cannot read property 'match' of undefined ItemPublisher.js? Line:247.

Looking at the subscribe() function just above the attachChart() function, the code that is executed when a series is set dynamically creates a listener which calls the attachChart() function passing the series and eventName. I have debugged through that section of the code and it appears to me that the eventName parameter is not being passed correctly on line 233. I would expect to see the itemTap event being passed. I have other charts where the line series is predefined in the chart configuration and those are working fine.

It would be very unwieldy to post all of my code but here is the code that creates my line series array:



Code:



createSeriesForChart:function(labelArray) {
var seriesArray = new Array();
for (var i = 0; i < labelArray.length; i++) {
seriesArray.push(new Ext.chart.series.Line({
xField:'time',
yField:labelArray[i],
style:{
stroke:this.unitChartLineColors[i],
lineWidth:2,
shadowColor: '#aaa',
shadowBlur: 3,
shadowOffsetX: 3,
shadowOffsetY: 3
}
}))
}
return seriesArray;
}

and then I set the series into the chart with:


Code:



chart.setSeries(series);

Again, the only difference between the charts that are working correctly and the ones that are generating an error is in the way that the line series are defined - either hardcoded or dynamic. Thank you for your attention to this.