Forum Discussion
harikm007
08-09-2022Data Warehouse
jmn3 Can you share bit more information about how the stacked bars should flow from left to right, if few values are blank? In above example, should '5/30/23' have both dark blue and orange bars as '5/23/23' has both colors?
-Hari
jmn3
08-09-2022Cloud Apps
harikm007 thank you for your response.
The orange bar represents new counts added that week and the blue bar is a running count of previous weeks. The weeks that have no values should be blue and have the total count of the last weeks with values (aka new + running sum).
- harikm00708-10-2022Data Warehouse
jmn3 Check below script if it gives you expected result
widget.on('processresult', function(se, ev){ var prevValue = -1 $.each(ev.result.series[0].data, function(index, value){ series0 = ev.result.series[0].data series1 = ev.result.series[1].data if(index == 0) { prevValue = series0[index].y + series1[index].y } else { if((!series0[index].y || series0[index].y == 0) && (!series1[index].y || series1[index].y == 0)) { ev.result.series[1].data[index].y = prevValue } else { prevValue =series0[index].y + series1[index].y } } }) })
-Hari