Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set opacity of Highcharts pie chart

I have an issue with IE8, while set opacity of a pie chart. I tried as follow,

.highcharts-point {
    filter:alpha(opacity=40);
}

When applied this, the pie chart points became not visible and their borders became grey color.

Does anyone know a solution?

like image 933
chinthakad Avatar asked Nov 24 '25 14:11

chinthakad


1 Answers

You can set the color of series:

var chart;
$(document).ready(function() {
   chart = new Highcharts.Chart({
      chart: {
         renderTo: 'container',
         defaultSeriesType: 'column'
      },
      xAxis: {
        categories: ['1','2']
      },
      plotOptions: {
         column: {
            pointPadding: 0.2,
            borderWidth: 0
         }
      },
           series: [{
         name: 'Tokyo',
         data: [95.6, 54.4]

      }, {
         name: 'New York',
         data: [106.6, 92.3]

      }, {
         name: 'London',
         data: [59.3, 51.2]

      }, {
         name: 'Berlin',
         data: [46.8, 51.1],
         color: 'rgba(150,100,50,0.5)'

      }]
   });


});

Note the last series defined there with color.

like image 73
Richard Burton Avatar answered Nov 27 '25 04:11

Richard Burton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!