We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5309ec commit f3b679fCopy full SHA for f3b679f
src/plots/cartesian/set_convert.js
@@ -184,10 +184,13 @@ module.exports = function setConvert(ax) {
184
// that aren't in the first etc.
185
// TODO: sorting options - do the sorting
186
// progressively here as we insert?
187
- if(ax._categories.indexOf(v)===-1) ax._categories.push(v);
188
189
- var c = ax._categories.indexOf(v);
190
- return c===-1 ? constants.BADNUM : c;
+ if(v !== null && v !== undefined && ax._categories.indexOf(v) === -1){
+ ax._categories.push(v);
+ return ax._categories.length - 1;
191
+ }else{
192
+ return constants.BADNUM;
193
+ }
194
};
195
196
ax.d2l = ax.d2c;
0 commit comments