Forum Discussion
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).
harikm007
08-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