javascript - Background color to highcharts - Stack Overflow

I have a requirement and I can't seem to figure out how to do it.I need to have a background color

I have a requirement and I can't seem to figure out how to do it.

I need to have a background color to my chart but not labels in highcharts. Is it possible, can anybody help me with this.

Sample link here for chart with a background color.

 chart: {
        backgroundColor: '#FCFFC5',
        type: 'line'
    },

jsFiddle

But what I need is:

In this image the area which is covered in red section need to have no background color.

I have a requirement and I can't seem to figure out how to do it.

I need to have a background color to my chart but not labels in highcharts. Is it possible, can anybody help me with this.

Sample link here for chart with a background color.

 chart: {
        backgroundColor: '#FCFFC5',
        type: 'line'
    },

jsFiddle

But what I need is:

In this image the area which is covered in red section need to have no background color.

Share Improve this question edited Jul 20, 2016 at 13:17 Mike Zavarello 3,5544 gold badges30 silver badges43 bronze badges asked Jul 18, 2016 at 17:51 Sai Babu BSai Babu B 1622 silver badges14 bronze badges 1
  • 1 If you had just keep looking at the docs you would see that there is a plotBackGroundColor option – ODelibalta Commented Jul 18, 2016 at 17:56
Add a ment  | 

2 Answers 2

Reset to default 7

You can set the chart background color and the plot area background color separately:

chart: {
  backgroundColor: '#fff',
  plotBackgroundColor: '#fcffc5'
}

Updated fiddle:

  • http://jsfiddle/jlbriggs/cfrfjuvz/1/

.highcharts-plot-background is what you are looking for. Add this to your CSS:

.highcharts-plot-background {
    fill: #FCFFC5;
}
.highcharts-plot-border {
    stroke-width: 2px;
    stroke: #7cb5ec;
}

Live example: jsFiddle.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742276973a4413772.html

相关推荐

  • javascript - Background color to highcharts - Stack Overflow

    I have a requirement and I can't seem to figure out how to do it.I need to have a background color

    1天前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信