I have managed to get this if statement to run the first part, but it will not run the else if bit correctly. I must be placing something incorrectly because it only shows (Not Designated) on the xAxis. Wondering why the else if part is not working.
labels: {
formatter: function() {
// custom formatter
if (this.x == null) { return "(Not Designated)";
} else if (this.x != null ) {
return this.x;
}
},
It must have something to do with how I am getting the data then, because my original if statement was like this...
if (this.x == null) return '(Not Designated)';
else return this.x;
If I use the "===" setup it does not show the (not designated) or any xAxis values, if I use the "==" it will show the (not designated) for all xAxis items. I understand that it is a really simple function to do this, but its not working and it either has something to do with Highcharts formatter or the data I am trying to gather. I have not dealt with null values much either so sorry for the bad markup examples...thanks for the comments!