Define Widget Navigator Scroll Position
Updated 03-02-2023
intapiuser - The above is really useful, I don't suppose you or someone else may know how to adapt this to also include forecasts? The script also seems to work for a line chart with dates across the x-axis, in that this will show me the last 14 days:
//======================= Configuration =======================
//Number of bars you would like to display, starting from the last bar
var displayBars = 14;
//================================================================
widget.on('processresult',function(widget,args){
//define the maximum bar count to be the series length, minus 1 because the below is zero indexed.
var maxBarCount = (args.result.series[0].data.length - 1);
args.widget.options.previousScrollerLocation.min = maxBarCount - displayBars + 1;
args.widget.options.previousScrollerLocation.max = maxBarCount;
});However, it doesn't show me the forecast period, just the actual data points:
Ideally, I am looking for something that shows the last 14 days, and also the forecast period, like this:
Thanks,
James