diff --git a/ChartGrid.js b/ChartGrid.js index 3b59941a5..f4a20ee26 100644 --- a/ChartGrid.js +++ b/ChartGrid.js @@ -619,7 +619,7 @@ } browserCanvasContext.closePath(); - browserCanvasContext.strokeStyle = 'rgba(0, 37, 224, 0.' + Math.trunc(lineWidth + 1) + ')'; + browserCanvasContext.strokeStyle = 'rgba(' + UI_COLOR.DARK + ', 0.' + Math.trunc(lineWidth + 1) + ')'; browserCanvasContext.lineWidth = lineWidth; diff --git a/TimelineChart.js b/TimelineChart.js index 05b891c54..9f38a9b2a 100644 --- a/TimelineChart.js +++ b/TimelineChart.js @@ -918,9 +918,10 @@ if (INTENSIVE_LOG === true) { logger.write("[INFO] drawBackground -> Entering function."); } - let targetLabelFontSize = 120; + let fontMaxSize = 80; + let targetLabelFontSize = fontMaxSize; let fontSizeIncrement = 12; - let currentFontSize = 120; + let currentFontSize = fontMaxSize; let market = markets.get(marketId); let label = market.assetA + " " + market.assetB; @@ -958,7 +959,7 @@ if (topPoint.y > viewPort.visibleArea.topLeft.y || bottomPoint.y < viewPort.visibleArea.bottomRight.y) { - targetLabelFontSize = 120 / 2; + targetLabelFontSize = fontMaxSize / 2; point = { x: 0, @@ -969,22 +970,22 @@ point = { x: (viewPort.visibleArea.bottomRight.x - viewPort.visibleArea.bottomLeft.x) / 2 - label.length / 2 * currentFontSize * FONT_ASPECT_RATIO, - y: point.y + currentFontSize * FONT_ASPECT_RATIO / 2 + y: point.y + currentFontSize / 2 }; } else { - targetLabelFontSize = 120; + targetLabelFontSize = fontMaxSize; point = { x: (viewPort.visibleArea.bottomRight.x - viewPort.visibleArea.bottomLeft.x) / 2 - label.length / 2 * currentFontSize * FONT_ASPECT_RATIO, - y: (viewPort.visibleArea.bottomLeft.y - viewPort.visibleArea.topLeft.y) / 2 + currentFontSize * FONT_ASPECT_RATIO / 2 + y: (viewPort.visibleArea.bottomLeft.y - viewPort.visibleArea.topLeft.y) / 2 + currentFontSize / 2 }; } - browserCanvasContext.font = currentFontSize + 'px ' + UI_FONT.PRIMARY; - browserCanvasContext.fillStyle = 'rgba(75, 86, 235, 0.07)'; + browserCanvasContext.font = currentFontSize + 'px ' + UI_FONT.SECONDARY; + browserCanvasContext.fillStyle = 'rgba(' + UI_COLOR.DARK + ', 0.07)'; browserCanvasContext.fillText(label, point.x, point.y); }