change title background - Javascript highcharts

Javascript examples for highcharts:Chart Title

Description

change title background

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.2.2.min.js"></script> 
      <script type="text/javascript">
    window.onload=function(){/*from   ww  w  .  ja  v  a 2  s  .c o m*/
$(function() {
  var chart = new Highcharts.Chart({
    chart: {
      renderTo: 'container',
      type: 'column',
    },
    xAxis: {
      label: {
        formatter: function() {
          return Highcharts.numberFormat(this.x, 0, '', ''); // Remove the thousands sep?
        }
      }
    },
    title: {
      useHTML: true,
      style: {
        color: '#FF00FF',
        'background-color': '#000000',
        fontWeight: 'bold'
      }
    },
    series: [{
      "data": [
        [2006, 1],
        [2007, 5],
        [2008, 7],
        [2009, 7],
        [2010, 13],
        [2011, 14],
        [2012, 16],
        [2013, 20]
      ],
      "name": "Series1"
    }, {
      "data": [
        [2012, 3],
        [2013, 3]
      ],
      "name": "Series2"
    }, {
      "data": [
        [2002, 1],
        [2003, 1],
        [2004, 6],
        [2005, 7],
        [2006, 10],
        [2007, 17],
        [2008, 23],
        [2009, 25],
        [2010, 34],
        [2011, 44],
        [2012, 51],
        [2013, 64]
      ],
      "name": "Series3"
    }]
  });
});
    }

      </script> 
   </head> 
   <body> 
      <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: 400px; height: 400px; margin: 0 auto"></div>  
   </body>
</html>

Related Tutorials