Change the font color of drill Up Button text - Javascript highcharts

Javascript examples for highcharts:Chart Drilldown

Description

Change the font color of drill Up Button text

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <title>Highcharts Demo</title> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <style id="compiled-css" type="text/css">

.highcharts-button-box+text {
   fill: red !important;/*  ww  w . ja v a  2  s .  co m*/
}


      </style> 
   </head> 
   <body> 
      <script src="https://code.highcharts.com/highcharts.js"></script> 
      <script src="https://code.highcharts.com/modules/drilldown.js"></script> 
      <div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div> 
      <script type="text/javascript">
Highcharts.chart('container', {
  chart: {
    type: 'column'
  },
  title: {
    text: 'Drilldown label styling'
  },
  xAxis: {
    type: 'category'
  },
  legend: {
    enabled: false
  },
  plotOptions: {
    series: {
      borderWidth: 0,
      dataLabels: {
        enabled: true
      }
    }
  },
  series: [{
    name: 'Things',
    colorByPoint: true,
    data: [{
      name: 'Dieren',
      y: 5,
      drilldown: 'animals'
    }, {
      name: 'Fruit',
      y: 2,
      drilldown: 'fruits'
    }, {
      name: 'Auto\'s',
      y: 4
    }]
  }],
  drilldown: {
    drillUpButton: {
      relativeTo: 'spacingBox',
      position: {
        y: 0,
        x: 0
      },
      theme: {
        fill: 'white',
        'stroke-width': 1,
        stroke: 'silver',
        r: 0,
        states: {
          hover: {
            fill: '#a4edba'
          },
          select: {
            stroke: '#039',
            fill: '#a4edba'
          }
        }
      }
    },
    series: [{
      id: 'animals',
      data: [
        ['Katten', 4],
        ['Honden', 2],
        ['Koeien', 1],
        ['Schapen', 2],
        ['Varkens', 1]
      ]
    }, {
      id: 'fruits',
      data: [
        ['Appels', 4],
        ['Sinaasappels', 2]
      ]
    }]
  }
});

      </script>  
   </body>
</html>

Related Tutorials