2013-02-11 11 views
5

Konstruuję pasek postępu za pomocą wykresu słupkowego (z procentowym układaniem w stos) i chcę usunąć spacje/wypełnienie w kontenerze i zachować tylko pasek bez marginesów/marginesów w pojemniku na wykresy.HighCharts - Usuwanie wypełnienia dla wykresu słupkowego

Czy istnieje sposób na osiągnięcie tego?

Fiddle

Kod:

$(function() { 
    var chart; 
    $(document).ready(function() { 
     chart = new Highcharts.Chart({ 
      chart: { 
       renderTo: 'container', 
       type: 'bar' 
      }, 
      legend: { 
       enabled: false, 
      }, 
      title: { 
       text: '' 
      }, 
      xAxis: { 

       lineWidth: 0, 

       labels: { 
        enabled: false 
       }, 
       minorTickLength: 0, 
       tickLength: 0 
      }, 
      yAxis: { 
       min: 0, 
       title: { 
        text: '' 
       }, 
       lineWidth: 0, 
       gridLineWidth:0, 
       lineColor: 'transparent', 
       labels: { 
        enabled: false 
       }, 
       minorTickLength: 0, 
       tickLength: 0 
      }, 
      tooltip: { 
       enabled: false 
      }, 
      plotOptions: { 
       bar: { 
        stacking: 'percent' 

       }, 
       series: { 
      pointPadding: 0, 
      groupPadding: 0,  
     } 
      }, 

      series: [{ 
       name: 'max', 
       data: [40], 
       color: 'white' 
      }, { 
       name: 'current', 
       data: [60], 
       color: 'green' 
      }] 
     }); 
    }); 

}); 

Odpowiedz

Powiązane problemy