Highcharts Stacked Area Chart
The following example demonstrates a stacked area 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 "normal". Use null to disable stacking. If the value is "percent", stacking is by percentage.
var plotOptions = {
area: {
stacking: 'normal',
lineColor: '#666666',
lineWidth: 1,
marker: {
lineWidth: 1,
lineColor: '#666666'
}
}
};
Example
Filename: highcharts_area_stacked.htm
Highcharts 教程 | Runoob Tutorial(runoob.com)
The output of the above example is:
Highcharts Area Chart