I have this code:
and let me know how to put an image at the beginning of the category. so as it is shown in this picture.
I do not know how, thank you very much.
$('#container').highcharts({
xAxis: {
categories: [data.d[300].nomindicador, data.d[500].nomindicador, data.d[600].nomindicador,data.d[700].nomindicador, data.d[900].nomindicador],
title: {
text: null
},
labels: {
align: 'left',
x: 10,
y: -20
}
},
yAxis: {
title: {
text: 'Resultado',
align: 'right'
}
},
tooltip: {
valueSuffix: ' dollars'
},
plotOptions: {
bar: {
dataLabels: {
enabled: false
}
}
},
legend: {
layout: 'vertical',
align: 'center',
verticalAlign: 'bottom',
x: -40,
y:40 ,
floating: true,
borderWidth: 1,
backgroundColor: '#FFFFFF',
shadow: true
}
To achieve this, you have to have to use the
useHTML
property on thelabels
object and set it to true.Then, you have to use the
format
property to inject an HTML image in your label.Full working example here:
http://jsfiddle.net/u3o416xb/
The code should look something like this: