From 8d8bd905a67e4e75b973a1b4a4aefa695668f55c Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 8 Aug 2024 14:28:01 +0100 Subject: [PATCH] Minor tweaks to charts --- static/js/bitcoin-business-growth-chart.js | 9 +++++++-- static/js/chart-params.js | 2 +- static/js/hashrate.js | 2 +- static/js/miner-rewards.js | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/static/js/bitcoin-business-growth-chart.js b/static/js/bitcoin-business-growth-chart.js index 6f18213..6b891dc 100644 --- a/static/js/bitcoin-business-growth-chart.js +++ b/static/js/bitcoin-business-growth-chart.js @@ -44,14 +44,19 @@ function updateChart() { axisLabel: axisLabel, axisLine: axisLine, type: "time", - name: "Date", }, yAxis: { axisTick: axisTick, splitLine: { show: false, }, - axisLabel: axisLabel, + axisLabel: { + fontSize: 12 * fontScale, + color: textColor, + formatter(value, index) { + return nFormatter(value, 0); + }, + }, axisLine: axisLine, }, diff --git a/static/js/chart-params.js b/static/js/chart-params.js index 2b03f5e..bc0dd63 100644 --- a/static/js/chart-params.js +++ b/static/js/chart-params.js @@ -1,4 +1,4 @@ -const fontScale = 1; +const fontScale = 0.8; const backgroundColor = "#f9f9f9"; const tooltipBgColor = "#e7e7f5"; diff --git a/static/js/hashrate.js b/static/js/hashrate.js index 271f61d..01673f2 100644 --- a/static/js/hashrate.js +++ b/static/js/hashrate.js @@ -38,7 +38,7 @@ function initEchart(dataArr) { type: "value", name: "Hashrate (H/s)", nameLocation: "middle", - nameGap: 35, + nameGap: 30, nameTextStyle: textStyleMain, position: "left", alignTicks: true, diff --git a/static/js/miner-rewards.js b/static/js/miner-rewards.js index fac94b3..f9774e6 100644 --- a/static/js/miner-rewards.js +++ b/static/js/miner-rewards.js @@ -31,7 +31,7 @@ function initEchart(dataArr) { yAxis: [ { type: "value", - name: "Total Daily Rewards (USD)", + name: "Rewards (USD)", nameLocation: "middle", nameGap: 35, nameTextStyle: textStyleMain, @@ -53,6 +53,7 @@ function initEchart(dataArr) { type: "value", name: "Block Subsidy (BTC)", nameLocation: "middle", + nameGap: 20, nameTextStyle: { fontSize: 12 * fontScale, color: textColor,