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

Highcharts Stacked Column Chart

Highcharts Stacked Column Chart

Highcharts Column ChartHighcharts Column Chart

The following example demonstrates a stacked 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'

         }

      }

   }

};

Example

Filename: highcharts_column_stacked.htm









Highcharts 教程 | Runoob Tutorial(runoob.com)









The output of the above example is:

Highcharts Column ChartHighcharts Column Chart