I'm trying to use Highchart's tickPositioner method to load tick positions via ajax so I can use some already existing logic to do the calculations. It does not seem to be waiting for the tickPositioner method to actually return data though. Anyone know what I'm doing wrong?
My actual code:
tickPositioner: function(min, max) {
$.getJSON('/fred2/graph/ajax-requests.php?action=gtp', {min: min, max: max}, function(data) {
console.log(data.tick_positions);
return data.tick_positions;
});
}
A JSFiddle example: http://jsfiddle.net/TWTZh/