1👍
Point’s y
coordinate in series’ data must be a number, so you would have to process your data to have it in required format. It would be for the best to do this server side and provide proper data for JS, but if that is not possible then you could process data in JS.
$(function() {
var data = ['ON', 'OFF', 'OFF', 'ON'],
processedData = [];
Highcharts.each(data, function(point) {
processedData.push(point === 'ON' ? 1 : 0);
});
$('#container').highcharts({
'yAxis': {
'categories': ['ON', 'OFF'],
'title': {
'text': 'Status'
}
},
series: [{
data: processedData
}]
});
});
Example: http://jsfiddle.net/ptu6qhjy/
Source:stackexchange.com