New to Kendo UI for jQuery? Start a free 30-day trial

Series.stack

configuration

A Boolean value indicating if the series should be stacked. A string value is interpreted as series.stack.group.

The stack options is supported when series.type is set to "bar", "column", "line", "area", "verticalLine", "verticalArea", "radarLine", "radarArea" and "radarColumn".

Stack settings of the first series are applied to the rest of the series.

series.stack

Boolean|String|Object

Default: false

<span id="sparkline"></span>
<script>
$("#sparkline").kendoSparkline({
  series: [
    { stack: true, data: [ 1, 2 , 3] },
    { data: [ 4, 5 , 6] }
  ]
});
</script>

Indicates that the series should be stacked in a group with the specified name.

The group option is supported when series.type is set to "bar" or "column".

<span id="sparkline"></span>
<script>
$("#sparkline").kendoSparkline({
  seriesDefaults: {
    type: "column"
  },
  series: [
    { stack: { group: "a" }, data: [ 1, 2 ] },
    { stack: { group: "a" }, data: [ 3, 4 ] },
    { stack: { group: "b" }, data: [ -1, -2 ] },
    { stack: { group: "b" }, data: [ -3, -4 ] }
  ]
});
</script>

The type of stack to plot. The following types are supported:

  • "normal" - the value of the stack is the sum of all points in the category (or group)
  • "100%" - the value of the stack is always 100% (1.00). Points within the category (or group) are represented as percentages.

Default: "normal"

<span id="sparkline"></span>
<script>
$("#sparkline").kendoSparkline({
  series: [
    { stack: { type: "100%" }, data: [ 1, 2 ] },
    { data: [ 10, 20 ] }
  ]
});
</script>