Cumulative Sum (Line Chart Widget)
Posted by Daniel Ranisavljevic on 24 March 2022 12:10 pm

Cumulative Sum can be achieved across a sorted category by:

  • adding the value of the current item to the previous item,
  • where the item isn't the first item in the list.

This can be achieved on a widget level for each series with the following script.

widget.on('processresult', (widget, args) => {
  args.result.series.forEach((series) => {
    for (i = 1; i <; i++) {[i].y +=[i - 1].y

(0 vote(s))
Not helpful

Comments (0)
Copyright © RAPID BI Pty Ltd 2020