Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Highcharts Stacked Group Column Chart

Highcharts Stacked Group Column Chart

Highcharts Column ChartHighcharts Column Chart

The following example demonstrates a stacked group column chart.

We learned the basic Highcharts configuration syntax in the previous chapters. Now let's look at some other configurations. Add the stacking property to plotOptions:


Configure

plotOptions: Data Point Options

plotOptions is used to set the data point-related properties of the chart. The property settings of plotOptions vary slightly depending on the chart type.

Configure chart stacking by setting plotOptions.area.stacking to "percent". Use null to disable stacking.



var plotOptions = {

   column: {

      stacking: 'normal',

      dataLabels: {

         enabled: true,

         color: (Highcharts.theme && Highcharts.theme.dataLabelsColor) || 'white',

         style: {

            textShadow: '0 0 3px black'

         }

      }

   }

};

series Data Series Item Configuration

Configure each corresponding data series item in the stacked group.



series: [{

   name: 'John',

   data: [5, 3, 4, 7, 2],

   stack: 'male'

}] 

Example

Filename: highcharts_column_rotated.htm









Highcharts 教程 | Runoob Tutorial(runoob.com)









The output of the above example is:

Highcharts Column ChartHighcharts Column Chart