最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Highcharts.js - Background color of axis only - Stack Overflow

programmeradmin7浏览0评论

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

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

Share Improve this question asked Apr 1, 2013 at 13:24 pixelworldspixelworlds 8282 gold badges11 silver badges22 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

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.

发布评论

评论列表(0)

  1. 暂无评论