From 462f53a44d93e8de6f4cbe2ec158b05375439865 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 27 May 2019 18:38:58 +0200 Subject: JQplot: larger zoom on x axis --- ishtar_common/static/js/jqplot/plugins/jqplot.cursor.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ishtar_common/static') diff --git a/ishtar_common/static/js/jqplot/plugins/jqplot.cursor.js b/ishtar_common/static/js/jqplot/plugins/jqplot.cursor.js index 75c03912e..495aaaea4 100644 --- a/ishtar_common/static/js/jqplot/plugins/jqplot.cursor.js +++ b/ishtar_common/static/js/jqplot/plugins/jqplot.cursor.js @@ -425,7 +425,8 @@ var newTicks = new Array(); // only get the relevant ticks and filter data for (var idxTick=0 ; idxTick < axes[ax].ticks.length; idxTick++) { - if (currentValue >= newmin && currentValue <= newmax){ + currentValue += tickDelta; + if (currentValue >= newmin && (currentValue - tickDelta) <= newmax){ newTicks.push(axes[ax].ticks[idxTick]); for (var idxSerie=0 ; idxSerie < series.length; idxSerie++) { if (currentData.length <= idxSerie) currentData.push(new Array()); @@ -433,7 +434,6 @@ [newTicks.length, series[idxSerie].data[idxTick][1]]); } } - currentValue += tickDelta; } if (newTicks.length){ axes[ax].min = newmin; -- cgit v1.2.3