Highcharts.js - 坐标轴背景色

4
感谢您的时间和帮助。
我正在使用Highcharts,并需要设置仅x轴和y轴的背景颜色。请参见附件:

enter image description here

所需内容是在x轴上设置一个与图表深灰色不同的背景颜色(现在它们显然相同)。
有人知道是否可能,如果是这样,如何解决?我已经详细阅读了Highcharts API Highstock API,但没有找到特别针对此问题的内容。
再次感谢您的时间和帮助!
Rich
1个回答

5

您尝试过以下方法吗:

 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();

阅读更多:highchart渲染器

x轴没有背景颜色 将背景颜色设置为HighChart x轴标签

希望这可以帮到你。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接