coordinateSystem going down to Plotters

This commit is contained in:
Luis Fernando Molina committed 2020-01-30 19:13:28 +01:00
1 parent 92d1a971ca
commit c9162c37cf
4 files changed
+39 -28

No files matched your search

+12 -6
View File
@@ -17,6 +17,7 @@
getContainer: getContainer,
setTimeFrame: setTimeFrame,
setDatetime: setDatetime,
setCoordinateSystem: setCoordinateSystem,
recalculateScale: recalculateScale,
draw: draw
};
@@ -27,7 +28,7 @@
container.initialize();
thisObject.container = container;
let coordinateSystem = newCoordinateSystem(); // Needed to be able to plot on the timeline, otherwise not.
let coordinateSystem
let timeFrame; // This will hold the current Time Frame the user is at.
let datetime; // This will hold the current Datetime the user is at.
@@ -65,22 +66,24 @@
plotLines = undefined;
thisObject.fitFunction = undefined
coordinateSystem = undefined
} catch (err) {
if (ERROR_LOG === true) { logger.write("[ERROR] ' + MODULE_NAME + ' -> finalize -> err = " + err.stack.stack); }
}
}
function initialize(pStorage, pDatetime, pTimeFrame, callBackFunction) {
function initialize(pStorage, pDatetime, pTimeFrame, pCoordinateSystem, callBackFunction) {
try {
datetime = pDatetime;
timeFrame = pTimeFrame;
coordinateSystem = pCoordinateSystem
fileSequence = pStorage.fileSequences[0];
recalculate();
recalculateScale();
filesUpdatedEventSubscriptionId = fileSequence.eventHandler.listenToEvent("Files Updated", onFilesUpdated); // Only the first sequence is supported right now.
offsetChangedEventSubscriptionId = canvas.chartSpace.viewport.eventHandler.listenToEvent("Position Changed", onViewportPositionChanged);
@@ -89,7 +92,6 @@
dimmensionsChangedEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('Dimmensions Changed', function () {
recalculate();
recalculateScale();
})
callBackFunction(GLOBAL.DEFAULT_OK_RESPONSE);
@@ -123,8 +125,12 @@
recalculate();
}
function setDatetime(newDatetime) {
datetime = newDatetime;
function setDatetime(pDatetime) {
datetime = pDatetime;
}
function setCoordinateSystem(pCoordinateSystem) {
coordinateSystem = pCoordinateSystem
}
function onViewportPositionChanged() {
+9 -8
View File
@@ -18,6 +18,7 @@
getContainer: getContainer,
setTimeFrame: setTimeFrame,
setDatetime: setDatetime,
setCoordinateSystem: setCoordinateSystem,
draw: draw,
recalculateScale: recalculateScale,
@@ -36,7 +37,7 @@
container.initialize();
thisObject.container = container;
let coordinateSystem = newCoordinateSystem(); // Needed to be able to plot on the timeline, otherwise not.
let coordinateSystem
let timeFrame; // This will hold the current Time Frame the user is at.
let datetime; // This will hold the current Datetime the user is at.
@@ -89,13 +90,15 @@
strategyImages = undefined;
thisObject.fitFunction = undefined
coordinateSystem = undefined
} catch (err) {
if (ERROR_LOG === true) { logger.write("[ERROR] finalize -> err = " + err.stack); }
}
}
function initialize(pStorage, pDatetime, pTimeFrame, callBackFunction) {
function initialize(pStorage, pDatetime, pTimeFrame, pCoordinateSystem, callBackFunction) {
try {
@@ -108,13 +111,12 @@
datetime = pDatetime;
timeFrame = pTimeFrame;
coordinateSystem = pCoordinateSystem
/* We need a Market File in order to calculate the Y scale, since this scale depends on actual data. */
marketFile = marketFiles.getFile(ONE_DAY_IN_MILISECONDS); // This file is the one processed faster.
recalculateScale();
/* Now we set the right files according to current Period. */
marketFile = marketFiles.getFile(pTimeFrame);
@@ -135,7 +137,6 @@
/* Ready for when dimmension changes. */
dimmensionsChangedEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('Dimmensions Changed', function () {
recalculateScale()
recalculate();
})
@@ -234,11 +235,11 @@
}
function setDatetime(pDatetime) {
if (INFO_LOG === true) { logger.write("[INFO] setDatetime -> Entering function."); }
datetime = pDatetime;
}
function setCoordinateSystem(pCoordinateSystem) {
coordinateSystem = pCoordinateSystem
}
function onDailyFileLoaded(event) {
+9 -8
View File
@@ -18,6 +18,7 @@
getContainer: getContainer,
setTimeFrame: setTimeFrame,
setDatetime: setDatetime,
setCoordinateSystem: setCoordinateSystem,
draw: draw,
recalculateScale: recalculateScale,
@@ -36,7 +37,7 @@
container.initialize();
thisObject.container = container;
let coordinateSystem = newCoordinateSystem(); // Needed to be able to plot on the timeline, otherwise not.
let coordinateSystem
let timeFrame; // This will hold the current Time Frame the user is at.
let datetime; // This will hold the current Datetime the user is at.
@@ -87,13 +88,15 @@
fileCursor = undefined;
thisObject.fitFunction = undefined
coordinateSystem = undefined
} catch (err) {
if (ERROR_LOG === true) { logger.write("[ERROR] finalize -> err = " + err.stack); }
}
}
function initialize(pStorage, pDatetime, pTimeFrame, callBackFunction) {
function initialize(pStorage, pDatetime, pTimeFrame, pCoordinateSystem, callBackFunction) {
try {
@@ -106,13 +109,12 @@
datetime = pDatetime;
timeFrame = pTimeFrame;
coordinateSystem = pCoordinateSystem
/* We need a Market File in order to calculate the Y scale, since this scale depends on actual data. */
marketFile = marketFiles.getFile(ONE_DAY_IN_MILISECONDS); // This file is the one processed faster.
recalculateScale();
/* Now we set the right files according to current Period. */
marketFile = marketFiles.getFile(pTimeFrame);
@@ -133,7 +135,6 @@
/* Ready for when dimmension changes. */
dimmensionsChangedEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('Dimmensions Changed', function () {
recalculateScale()
recalculate();
})
@@ -227,11 +228,11 @@
}
function setDatetime(pDatetime) {
if (INFO_LOG === true) { logger.write("[INFO] setDatetime -> Entering function."); }
datetime = pDatetime;
}
function setCoordinateSystem(pCoordinateSystem) {
coordinateSystem = pCoordinateSystem
}
function onDailyFileLoaded(event) {
+9 -6
View File
@@ -17,6 +17,7 @@
getContainer: getContainer,
setTimeFrame: setTimeFrame,
setDatetime: setDatetime,
setCoordinateSystem: setCoordinateSystem,
draw: draw,
recalculateScale: recalculateScale,
@@ -35,7 +36,7 @@
container.initialize();
thisObject.container = container;
let coordinateSystem = newCoordinateSystem(); // Needed to be able to plot on the timeline, otherwise not.
let coordinateSystem
let timeFrame; // This will hold the current Time Frame the user is at.
let datetime; // This will hold the current Datetime the user is at.
@@ -93,13 +94,15 @@
fileCursor = undefined;
thisObject.fitFunction = undefined
coordinateSystem = undefined
} catch (err) {
if (ERROR_LOG === true) { logger.write("[ERROR] finalize -> err = " + err.stack); }
}
}
function initialize(pStorage, pDatetime, pTimeFrame, callBackFunction) {
function initialize(pStorage, pDatetime, pTimeFrame, pCoordinateSystem, callBackFunction) {
try {
@@ -110,13 +113,12 @@
datetime = pDatetime;
timeFrame = pTimeFrame;
coordinateSystem = pCoordinateSystem
/* We need a Market File in order to calculate the Y scale, since this scale depends on actual data. */
marketFile = marketFiles.getFile(ONE_DAY_IN_MILISECONDS); // This file is the one processed faster.
recalculateScale();
/* Now we set the right files according to current Period. */
marketFile = marketFiles.getFile(pTimeFrame);
@@ -137,7 +139,6 @@
/* Ready for when dimmension changes. */
dimmensionsChangedEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('Dimmensions Changed', function () {
recalculateScale()
recalculate();
})
@@ -221,9 +222,11 @@
}
function setDatetime(pDatetime) {
datetime = pDatetime;
}
function setCoordinateSystem(pCoordinateSystem) {
coordinateSystem = pCoordinateSystem
}
function onDailyFileLoaded(event) {