From 330b9746268790a2089cfdd585f4810cf0855839 Mon Sep 17 00:00:00 2001 From: Victor Malai Date: Mon, 15 Mar 2021 16:07:28 +0200 Subject: [PATCH] fix issue with zoom and hover markers position --- build/nv.d3.js | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/build/nv.d3.js b/build/nv.d3.js index 834e4e281..22f348fc0 100644 --- a/build/nv.d3.js +++ b/build/nv.d3.js @@ -154,31 +154,31 @@ if (typeof(module) !== 'undefined' && typeof(exports) !== 'undefined') { if (typeof(window) !== 'undefined') { window.nv = nv; } -/* Facade for queueing DOM write operations - * with Fastdom (https://github.com/wilsonpage/fastdom) - * if available. - * This could easily be extended to support alternate - * implementations in the future. - */ -nv.dom.write = function(callback) { - if (window.fastdom !== undefined) { - return fastdom.mutate(callback); - } - return callback(); -}; - -/* Facade for queueing DOM read operations - * with Fastdom (https://github.com/wilsonpage/fastdom) - * if available. - * This could easily be extended to support alternate - * implementations in the future. - */ -nv.dom.read = function(callback) { - if (window.fastdom !== undefined) { - return fastdom.measure(callback); - } - return callback(); -}; +/* Facade for queueing DOM write operations + * with Fastdom (https://github.com/wilsonpage/fastdom) + * if available. + * This could easily be extended to support alternate + * implementations in the future. + */ +nv.dom.write = function(callback) { + if (window.fastdom !== undefined) { + return fastdom.mutate(callback); + } + return callback(); +}; + +/* Facade for queueing DOM read operations + * with Fastdom (https://github.com/wilsonpage/fastdom) + * if available. + * This could easily be extended to support alternate + * implementations in the future. + */ +nv.dom.read = function(callback) { + if (window.fastdom !== undefined) { + return fastdom.measure(callback); + } + return callback(); +}; /* Utility class to handle creation of an interactive layer. This places a rectangle on top of the chart. When you mouse move over it, it sends a dispatch containing the X-coordinate. It can also render a vertical line where the mouse is located. @@ -10000,7 +10000,7 @@ nv.models.lineChart = function() { var point = currentValues[pointIndex]; var pointYValue = chart.y()(point, pointIndex); if (pointYValue !== null) { - lines.highlightPoint(i, series.values.indexOf(point), true); + lines.highlightPoint(i, pointIndex, true); } if (point === undefined) return; if (singlePoint === undefined) singlePoint = point;