Remove chart border - Javascript highcharts

Javascript examples for highcharts:Chart Configuration

Description

Remove chart border

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-1.9.1.js"></script> 
      <script type="text/javascript">
$(function () {/*w  ww .  j a  v  a 2  s .com*/
        $('#container').highcharts({
    chart: {
        renderTo: 'container',
        backgroundColor: '#d6d7d4',
        zoomType: 'x'
    },
    xAxis: {
        type: 'datetime',
        dateTimeLabelFormats: {
            year: '%Y'
        }
    },
    yAxis: {
        title: {
            text: 'MW'
        },
        max: 500,
        plotBands: [{
            from: 0,
            to: 100,
            color: 'rgba(247, 247, 247, 0.3)'
        }, {
            from: 100,
            to: 200,
            color: 'rgba(215, 216, 212, 0.3)'
        }, { // Light breeze
            from: 200,
            to: 300,
            color: 'rgba(247, 247, 247, 0.3)'
        }, { // Light breeze
            from: 300,
            to: 400,
            color: 'rgba(215, 216, 212, 0.3)'
        },{
            from: 400,
            to: 500,
            color: 'rgba(247, 247, 247, 0.3)'
        }]
    },
    title: {
        text: ''
    },
    subtitle: {
        text: ''
    },
    tooltip: {
        formatter: function() {
            return '<b>'+ this.series.name +'</b><br/>'+
            Highcharts.dateFormat('%Y', this.x) +': '+ this.y +' %';
        },
        valueDecimals: 1,
        valueSuffix: ' %'
    },
    series:
    [{
        data: [[Date.UTC(2005, 1, 1),0],
            [Date.UTC(2008, 1, 1),10],
            [Date.UTC(2008, 1, 1),20],
            [Date.UTC(2010, 10, 1),30],
            [Date.UTC(2010, 10, 1),40],
            [Date.UTC(2013, 7, 1),50],
            [Date.UTC(2013, 7, 1),80]],
        type: 'line',
        color: "#504AA9"
    }]
});
    });

      </script> 
   </head> 
   <body style="background-color:#d6d7d4;"> 
      <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