0

I have tried to add border for selected series. Please adivise

    series: [{
        showInLegend: false,
        name: 'Twitter Trending',
        colorByPoint: true,
        data: dataArr,
        select: {
            borderWidth: 4,
            borderColor: '#e4b0b2'
        },
        allowPointSelect: true
    }]

Reference Screenshot

Udhay
  • 35
  • 6

1 Answers1

1

In order to get desired result, plotoptions will be

plotOptions: {
    series: {
      allowPointSelect: true,
      states: {
        select: {
          borderWidth: 4,
          borderColor: '#e4b0b2'
        }
      }
    }
  },

Highcharts.chart('container', {
  chart: {
    type: 'column'
  },
  title: {
    text: 'Stacked bar chart'
  },
  xAxis: {
    categories: ['Apples', 'Oranges', 'Pears', 'Grapes', 'Bananas']
  },
  yAxis: {
    min: 0,
    title: {
      text: 'Total fruit consumption'
    }
  },
  legend: {
    reversed: true
  },
  plotOptions: {
    series: {
      allowPointSelect: true,
      states: {
        select: {
          borderWidth: 4,
          borderColor: '#e4b0b2'
        }
      }
    }
  },
  series: [{
    name: 'John',
    data: [3, 4, 4, 2, 5],
    showInLegend: false,
    name: 'Twitter Trending',
    colorByPoint: true,
  }]
});
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>

<div id="container" style="min-width: 310px; max-width: 800px; height: 400px; margin: 0 auto"></div>
Patata
  • 273
  • 3
  • 18