PDA

View Full Version : Ext.chart.Chart problem with minimum value



tigran
2 Sep 2013, 10:15 PM
ExtJS 4.2.1

There is a bug in ExtJS code for Ext.chart.Chart. So when you specify 'minimum' attribute value different than 0, and have more than one time series chart in one and same chart, with not exactly matching x values, the chart datapoints are just being skipped and don't rendered. The code bug in in Ext.chart.axis.Numeric (ext-all-debug-w-comments.js, line 89316). The code:


value = record.get(fields[i]);
if (me.type == 'Time' && typeof value == "string") {
value = Date.parse(value);
}
if (+value < +min) {
addRecord = false;
break;
}
if (+value > +max) {
addRecord = false;
break;
}

must be with null checks for 'value':


value = record.get(fields[i]);
if (me.type == 'Time' && typeof value == "string") {
value = Date.parse(value);
}
if (value != null && value != '' && +value < +min) {
addRecord = false;
break;
}
if (value != null && value != '' && +value > +max) {
addRecord = false;
break;
}

Regards.

Gary Schlosberg
3 Sep 2013, 9:03 AM
Thanks for the report. You have provided much detail, but any chance you have a small test case which reproduces the issue?

tigran
3 Sep 2013, 11:39 PM
Sorry for not posting, an example due to time constraints. You can reproduce it by drawing in example two datasets in one chart, which x axes points do not match with each other. And specify in example any minimum value different from 0, let's say your first x assumed to start from 10... You will notice that not all points are being drawn on chart.

contisma
15 Sep 2013, 7:21 PM
I am experiencing the same issue with multiple string series.

Tigran, have you managed to workaround this issue?