Satya Narayan Patidar
Satya Narayan Patidar

Reputation: 51

how to add border radius on plotbackground area in highcharts

I browsed Highcharts api reference doc, there is an option to set plotBackgroundColor, but how to set border radius on plot area?

Is there some hack to add border radius on plot area?

Thanks in advance!

Upvotes: 0

Views: 381

Answers (1)

Paweł Fus
Paweł Fus

Reputation: 45079

As you can see, there is only plotBackgroundColor, not radius in the options. However, you can add that radius, using Element.attr(). See: http://jsfiddle.net/wmr9w5L3/

    chart: {
        plotBackgroundColor: {
            linearGradient: [0, 0, 500, 500],
            stops: [
                [0, 'rgb(255, 255, 255)'],
                [1, 'rgb(200, 200, 255)']
            ]
        },
        events: {
            load: function () {
                this.plotBackground.attr({
                    rx: 100,
                    ry: 100
                })
            }
        }
    },

Upvotes: 1

Related Questions