StackId: Number | String;
The StackId property determines identifier of chart stacking.
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.
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: