private boundRangeByItemDates()

in packages/timebrush-powerbi/src/TimeBrushVisual.ts [199:208]


    private boundRangeByItemDates(range: [Date, Date]) {
         // Bound the range to actual available dates
         range = <[Date, Date]>this.getRangeBoundItems(range).map(n => n.date);

         // If the selected range is just a single item, then offset the final dates a little bit to create a brush
         if (range.length === 2 && range[0].getTime() === range[1].getTime()) {
             range = [new Date(range[0].getTime() - 1), new Date(range[1].getTime() + 1)];
         }
         return range;
    }