Cleaning
This commit is contained in:
1 parent
7752458a91
commit
383069cdb6
5 files changed
-157
No files matched your search
@@ -18,7 +18,6 @@
|
||||
setTimeFrame: setTimeFrame,
|
||||
setDatetime: setDatetime,
|
||||
draw: draw,
|
||||
recalculateScale: recalculateScale,
|
||||
|
||||
/* Events declared outside the plotter. */
|
||||
|
||||
@@ -111,8 +110,6 @@
|
||||
|
||||
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 +130,6 @@
|
||||
/* Ready for when dimmension changes. */
|
||||
|
||||
dimmensionsChangedEventSubscriptionId = thisObject.container.eventHandler.listenToEvent('Dimmensions Changed', function () {
|
||||
recalculateScale()
|
||||
recalculate();
|
||||
})
|
||||
|
||||
@@ -444,37 +440,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function recalculateScale() {
|
||||
|
||||
try {
|
||||
|
||||
|
||||
if (coordinateSystem.maxValue > 0) { return; } // Already calculated.
|
||||
|
||||
let minValue = {
|
||||
x: MIN_PLOTABLE_DATE.valueOf(),
|
||||
y: 0
|
||||
};
|
||||
|
||||
let maxValue = {
|
||||
x: MAX_PLOTABLE_DATE.valueOf(),
|
||||
y: nextPorwerOf10(MAX_DEFAULT_RATE_SCALE_VALUE) / 4 // TODO: This 4 is temporary
|
||||
};
|
||||
|
||||
|
||||
coordinateSystem.initialize(
|
||||
minValue,
|
||||
maxValue,
|
||||
thisObject.container.frame.width,
|
||||
thisObject.container.frame.height
|
||||
);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] recalculateScale -> err = " + err.stack); }
|
||||
}
|
||||
}
|
||||
|
||||
function plotChart() {
|
||||
|
||||
try {
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
setTimeFrame: setTimeFrame,
|
||||
setDatetime: setDatetime,
|
||||
setCoordinateSystem: setCoordinateSystem,
|
||||
recalculateScale: recalculateScale,
|
||||
draw: draw
|
||||
};
|
||||
|
||||
@@ -336,35 +335,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function recalculateScale() {
|
||||
|
||||
try {
|
||||
|
||||
if (fileSequence === undefined) { return; } // We need the market file to be loaded to make the calculation.
|
||||
if (coordinateSystem.maxValue > 0) { return; } // Already calculated.
|
||||
|
||||
let minValue = {
|
||||
x: MIN_PLOTABLE_DATE.valueOf(),
|
||||
y: 0
|
||||
};
|
||||
|
||||
let maxValue = {
|
||||
x: MAX_PLOTABLE_DATE.valueOf(),
|
||||
y: nextPorwerOf10(MAX_DEFAULT_RATE_SCALE_VALUE) / 4 // TODO: This 4 is temporary
|
||||
};
|
||||
|
||||
coordinateSystem.initialize(
|
||||
minValue,
|
||||
maxValue,
|
||||
thisObject.container.frame.width,
|
||||
thisObject.container.frame.height
|
||||
);
|
||||
|
||||
} catch (err) {
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] ' + MODULE_NAME + ' -> recalculateScale -> err = " + err.stack); }
|
||||
}
|
||||
}
|
||||
|
||||
function draw() {
|
||||
plotChart();
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
setDatetime: setDatetime,
|
||||
setCoordinateSystem: setCoordinateSystem,
|
||||
draw: draw,
|
||||
recalculateScale: recalculateScale,
|
||||
|
||||
/* Events declared outside the plotter. */
|
||||
|
||||
@@ -480,36 +479,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function recalculateScale() {
|
||||
|
||||
try {
|
||||
|
||||
if (coordinateSystem.maxValue > 0) { return; } // Already calculated.
|
||||
|
||||
let minValue = {
|
||||
x: MIN_PLOTABLE_DATE.valueOf(),
|
||||
y: 0
|
||||
};
|
||||
|
||||
let maxValue = {
|
||||
x: MAX_PLOTABLE_DATE.valueOf(),
|
||||
y: nextPorwerOf10(MAX_DEFAULT_RATE_SCALE_VALUE) / 4 // TODO: This 4 is temporary
|
||||
};
|
||||
|
||||
|
||||
coordinateSystem.initialize(
|
||||
minValue,
|
||||
maxValue,
|
||||
thisObject.container.frame.width,
|
||||
thisObject.container.frame.height
|
||||
);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] recalculateScale -> err = " + err.stack); }
|
||||
}
|
||||
}
|
||||
|
||||
function plotChart() {
|
||||
|
||||
try {
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
setDatetime: setDatetime,
|
||||
setCoordinateSystem: setCoordinateSystem,
|
||||
draw: draw,
|
||||
recalculateScale: recalculateScale,
|
||||
|
||||
/* Events declared outside the plotter. */
|
||||
|
||||
@@ -461,36 +460,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function recalculateScale() {
|
||||
|
||||
try {
|
||||
|
||||
if (coordinateSystem.maxValue > 0) { return; } // Already calculated.
|
||||
|
||||
let minValue = {
|
||||
x: MIN_PLOTABLE_DATE.valueOf(),
|
||||
y: 0
|
||||
};
|
||||
|
||||
let maxValue = {
|
||||
x: MAX_PLOTABLE_DATE.valueOf(),
|
||||
y: nextPorwerOf10(MAX_DEFAULT_RATE_SCALE_VALUE) / 4 // TODO: This 4 is temporary
|
||||
};
|
||||
|
||||
|
||||
coordinateSystem.initialize(
|
||||
minValue,
|
||||
maxValue,
|
||||
thisObject.container.frame.width,
|
||||
thisObject.container.frame.height
|
||||
);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] recalculateScale -> err = " + err.stack); }
|
||||
}
|
||||
}
|
||||
|
||||
function plotChart() {
|
||||
|
||||
try {
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
setDatetime: setDatetime,
|
||||
setCoordinateSystem: setCoordinateSystem,
|
||||
draw: draw,
|
||||
recalculateScale: recalculateScale,
|
||||
|
||||
/* Events declared outside the plotter. */
|
||||
|
||||
@@ -503,35 +502,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function recalculateScale() {
|
||||
|
||||
try {
|
||||
|
||||
if (coordinateSystem.maxValue > 0) { return; } // Already calculated.
|
||||
|
||||
let minValue = {
|
||||
x: MIN_PLOTABLE_DATE.valueOf(),
|
||||
y: 0
|
||||
};
|
||||
|
||||
let maxValue = {
|
||||
x: MAX_PLOTABLE_DATE.valueOf(),
|
||||
y: nextPorwerOf10(MAX_DEFAULT_RATE_SCALE_VALUE) / 4 // TODO: This 4 is temporary
|
||||
};
|
||||
|
||||
coordinateSystem.initialize(
|
||||
minValue,
|
||||
maxValue,
|
||||
thisObject.container.frame.width,
|
||||
thisObject.container.frame.height
|
||||
);
|
||||
|
||||
} catch (err) {
|
||||
|
||||
if (ERROR_LOG === true) { logger.write("[ERROR] recalculateScale -> err = " + err.stack); }
|
||||
}
|
||||
}
|
||||
|
||||
function plotChart() {
|
||||
|
||||
try {
|
||||
|
||||
Reference in new issue
Block a user