diff --git a/.vs/AAOlivia-Plotter/v15/.suo b/.vs/AAOlivia-Plotter/v15/.suo index 77b1e8b0a..fc3fa314b 100644 Binary files a/.vs/AAOlivia-Plotter/v15/.suo and b/.vs/AAOlivia-Plotter/v15/.suo differ diff --git a/Volumes.js b/Volumes.js index 63fe74379..246db2cce 100644 --- a/Volumes.js +++ b/Volumes.js @@ -388,7 +388,7 @@ let timePeriodRatio = ONE_DAY_IN_MILISECONDS / timePeriod; - maxValue.y = marketFile.maxVolume() / (timePeriodRatio / 10); + maxValue.y = getMaxVolume() / (timePeriodRatio / 10); plotArea.initializeY( minValue, @@ -402,6 +402,23 @@ thisObject.container.frame.height ); + function getMaxVolume() { + + let maxValue = 0; + + for (var i = 0; i < marketFile.length; i++) { + + let currentMax = marketFile[i][0] + marketFile[i][1]; + + if (maxValue < currentMax) { + maxValue = currentMax; + } + } + + return maxValue; + + } + } function plotChart() {