ChandraShekar
ChandraShekar

Reputation: 386

I want to apply custom styles for highchart plotline labels

I want to apply custom style highchart plotline label. I'm using borderRadiusRight option but it not applying. Following is my code. Please check.

Highcharts.chart('chart', {
  //...
  xAxis: {
    plotLines: [{
      color: 'red',
      width: 2,
      value: sbar,
      dashStyle: 'solid',
      label: {
        y: -6,
        x: 25,
        useHTML: true,
        text: 'Start date',
        textAlign: 'center',
        rotation: 0,
        style: {
          backgroundColor: 'red',
          color: 'white',
          padding: '2px',
          fontWeight: 'bold',
          borderRadiusRight: '10px'
        }
      },
    }]

  }
  //...
});

Upvotes: 1

Views: 696

Answers (1)

Gowri
Gowri

Reputation: 1856

There is no style borderRadiusRight in css/highcharts. You have to use borderRadius property for this.

Try with borderRadius: 0 10px 10px 0

Here first value applies to top-left, second value applies to top-right, third value applies to bottom-right, fourth value applies to bottom-left corners.

Upvotes: 2

Related Questions