From 315c380d2fe11fa7e83c35cdb32f6adb4c1da588 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Mon, 20 May 2019 13:51:23 +0200 Subject: [PATCH] Sending fitFunction to plotters --- ChartsSpace/PlottersManager.js | 5 ++++- ChartsSpace/TimelineChart.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChartsSpace/PlottersManager.js b/ChartsSpace/PlottersManager.js index 2fcd09013..47e5c71f7 100644 --- a/ChartsSpace/PlottersManager.js +++ b/ChartsSpace/PlottersManager.js @@ -11,10 +11,11 @@ function newPlottersManager () { let datetime = NEW_SESSION_INITIAL_DATE let thisObject = { + fitFunction: undefined, + container: undefined, setDatetime: setDatetime, setTimePeriod: setTimePeriod, positionAtDatetime: positionAtDatetime, - container: undefined, draw: draw, getContainer: getContainer, initialize: initialize, @@ -180,6 +181,7 @@ function newPlottersManager () { let bot = ecosystem.getBot(devTeam, participant.bot) participant.profilePicture = bot.profilePicture } + plotter.fitFunction = thisObject.fitFunction plotter.initialize(competition, storage, datetime, timePeriod, onPlotterInizialized) function onPlotterInizialized (err) { @@ -350,6 +352,7 @@ function newPlottersManager () { plotter.container.connectToParent(thisObject.container, true, true, false, true, true, true) plotter.container.frame.position.x = thisObject.container.frame.width / 2 - plotter.container.frame.width / 2 plotter.container.frame.position.y = thisObject.container.frame.height / 2 - plotter.container.frame.height / 2 + plotter.fitFunction = thisObject.fitFunction plotter.initialize(storage, exchange, market, datetime, timePeriod, onPlotterInizialized) function onPlotterInizialized () { diff --git a/ChartsSpace/TimelineChart.js b/ChartsSpace/TimelineChart.js index bce46cf18..82a09b62c 100644 --- a/ChartsSpace/TimelineChart.js +++ b/ChartsSpace/TimelineChart.js @@ -132,6 +132,7 @@ function newTimelineChart () { plotterManager.container.frame.position.x = 0 plotterManager.container.frame.position.y = 0 + plotterManager.fitFunction = thisObject.fitFunction plotterManager.initialize(productsPanel, pExchange, pMarket, onPlotterManagerReady) function onPlotterManagerReady (err) {