Highchart: Background color of Axis
highcharts
Solution
Did you try to use `labels.formatter` with background and `useHTML` flag? Something like this: http://jsfiddle.net/AeV7h/
xAxis: {
categories: ['Foo', 'Bar', 'Foobar'],
labels: {
useHTML: true,
formatter: function() {
return '<span class="hc-label">' + this.value + '</span>';
}
}
},
And CSS:
.hc-label {
background-color: red;
padding: 0px 5px;
color: yellow;
}
Problem
I saw a similar question here. In reply its written that we can have background color by making a rectangle. My question is how I can get `x` and `Y` position of all the ticks on axis. I will need it because I want background color only on alternate dates. Thanks