Highcharts.js - 仅轴的背景颜色 [英] Highcharts.js - Background color of axis only
问题描述
预先感谢您的时间和帮助。
我使用的是Highcharts,需要设置x和y轴的背景颜色。请参阅附件:
p>
所以我需要的是在x轴上设置一个背景颜色,它不同于图的深灰色(现在他们显然是一样的)
有没有人知道这是否可能,如果是这样,怎么去呢?我已经通过highcharts API Highstock API 广泛,但没有找到任何专门为此。
再次感谢您的时间和帮助!
Rich
解决方案呈现矩形并将其定位到图形的底部。
chart.renderer。 $($ / *,X轴* / *,275 / * Y轴* / 680 / *宽度* / 25 / *高度* / 00)
.attr $ b'stroke-width':0,
stroke:'#888888',
fill:'#888888',
zIndex:3
})
。加();
阅读更多: highchart renderer
x-asis没有backgroundColor 将背景颜色设置为HighChart xAxis标签
希望有帮助。
Thanks in advance for your time and help.
I'm using highcharts and need to set the background color of only the x and y axis. See attached:
So what I need is to set a background color on the x-axis that is different from the dark gray of the graph (right now they are obviously the same)
Does anyone know if this is possible and, if so, how to go about it? I've been through the highcharts API Highstock API extensively, but couldn't find anything specifically for this.
Thank you again for your time and help!
Rich
Did you try:
rendered a rectangle and positioned it to the bottom of the graph.
chart.renderer.rect(0/*position on X-axis*/, 275/*position on Y-axis*/, 680/*width*/ , 25/*height*/, 00)
.attr({
'stroke-width': 0,
stroke: '#888888',
fill: '#888888',
zIndex: 3
})
.add();
Read more: highchart renderer
x-asis does not have backgroundColor Set background color to HighChart xAxis labels
Hope this help.
这篇关于Highcharts.js - 仅轴的背景颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!