我使用Highcharts创建一些图表,但我发现它不能用于更改图表标题的background
。
例如:
// works, the color did get to red
title: {
text: title,
style: {"color":"#ff0000"}
},
// the color did get to white but the background is not set to red.
title: {
text: title,
style: {"backgroundcolor":"#ff0000", "color":"#ffffff"}
},
我该怎么做才能解决这个问题?
由于
答案 0 :(得分:5)
引用this question,您可以通过设置useHTML: true
并使用background-color
来完成此操作。
title: {
useHTML: true,
style: {
color: '#FF00FF',
'background-color': '#000000',
fontWeight: 'bold'
}
},