ChartCanvasSerie.StackId

Syntax

StackId: Number | String;

Description

The StackId property determines identifier of chart stacking.

Comments

Use JSON to set the property value and the getStackId method to get the property value.

Allowed values for chart stacking identifiers are given on the page with description of the Chart.Stacking property.

Example

Executing the example requires that the HTML page contains the Chart component named chart (see Example of Creating a Line Chart). Show the line chart as a stacked chart with absolute values:

PP.Object.defineProps(PP.Ui.Chart, ["Stacking"], true);
PP.Object.defineProps(PP.Ui.ChartCanvasSerie, ["StackId"], true);
// Use chart with absolute stacking
chart.setStacking("Absolute");
for (var i in chart.getSeries()) {
    var serie = chart.getSeries()[i];
    // Set stacking identifier for a data series 
    serie.setStackId("Absolute");
}
// Redraw chart
chart.redraw(true);

After executing the example the initial chart is converted into a stacked chart with absolute values:

See also:

ChartCanvasSerie