admin管理员组

文章数量:1435859

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.

本文标签: javascriptHighchartsjsBackground color of axis onlyStack Overflow