Home forums Report Bugs Issue With Panning To Far Right Of Charts Reply To: Issue With Panning To Far Right Of Charts

#26005

The previously-posted code block causes the zoom to change when panning between far left and right sides of the chart (doesn’t seem to affect the rubber-band scrolling effect “mode”). Try this instead:

if (isFinite(q.dataInfo.minDiff)) {
    B = q.getApparentDifference(n, f, null, !0);
    if (!(g || !(this.panEnabled && q.scaleBreaks && q.scaleBreaks._appliedBreaks.length) && (q.logarithmic && B < Math.pow(q.dataInfo.minDiff, 3) || !q.logarithmic && B < 3 * Math.abs(q.dataInfo.minDiff)) || (this.plotArea.x1 <= q.convertValueToPixel(q.minimum) && n < q.minimum) || (this.plotArea.x2 >= q.convertValueToPixel(q.maximum) && f > q.maximum))) {
        w.push(q);
        s.push({
            val1: f > q.maximum ? n - (f - q.maximum) : n < q.minimum ? q.minimum : n,
            //val1: this.plotArea.x1 <= q.convertValueToPixel(q.minimum) && n < q.minimum ? q.minimum : n,  // enable for rubber-band scrolling effect
            val2: n < q.minimum ? f + (q.minimum - n) : f > q.maximum ? q.maximum : f
            //val2: this.plotArea.x2 >= q.convertValueToPixel(q.maximum) && f > q.maximum ? q.maximum : f  // enable for rubber-band scrolling effect
        });
        l = !0;
    } else if (!e) {
        l = !1;
        break;
    }
}