From 1102baa30ea1b83777f655c0d47ebdad68d0265b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 13 Feb 2020 12:08:13 +0100 Subject: [PATCH] Bug Fixed --- Plotter.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Plotter.js b/Plotter.js index 0f90ee3c5..32a4f3ff4 100644 --- a/Plotter.js +++ b/Plotter.js @@ -8,6 +8,7 @@ function newPlotter () { let thisObject = { currentRecord: undefined, container: undefined, + fitFunction: undefined, onDailyFileLoaded: onDailyFileLoaded, initialize: initialize, finalize: finalize, @@ -67,6 +68,7 @@ function newPlotter () { marketFiles.eventHandler.stopListening(marketFilesUpdatedEventSubscriptionId) dailyFiles.eventHandler.stopListening(dailyFilesUpdatedEventSubscriptionId) thisObject.container.eventHandler.stopListening(onDisplaceEventSubscriptionId) + thisObject.fitFunction = undefined /* Clear References */ marketFiles = undefined @@ -724,6 +726,7 @@ function newPlotter () { } /* We make sure the points do not fall outside the viewport visible area. This step allways need to be done. */ dataPoint = canvas.chartSpace.viewport.fitIntoVisibleArea(dataPoint) + dataPoint = thisObject.fitFunction(dataPoint) if (k === 0) { browserCanvasContext.moveTo(dataPoint.x, dataPoint.y) } else {