From 77c4c9d555a97fde659e720fbe7db28a16b6e192 Mon Sep 17 00:00:00 2001 From: Braeden Sowinski Date: Sun, 5 Nov 2023 19:21:30 -0800 Subject: [PATCH] update/bold chart axies --- commands/player-stats.js | 34 +++++++++++++++++++++++++++++++++- commands/weapon-stats.js | 14 +++++++++++++- package.json | 2 +- 3 files changed, 47 insertions(+), 3 deletions(-) diff --git a/commands/player-stats.js b/commands/player-stats.js index bbf0e76..54e2a80 100644 --- a/commands/player-stats.js +++ b/commands/player-stats.js @@ -167,6 +167,18 @@ module.exports = { ], }], }, + options: { + legend: { + labels: { + fontSize: 14, + fontStyle: 'bold', + } + }, + scales: { + yAxes: [{ ticks: { fontStyle: 'bold' } }], + xAxes: [{ ticks: { fontStyle: 'bold' } }], + }, + }, }; const encodedChart = encodeURIComponent(JSON.stringify(chart)); @@ -196,6 +208,18 @@ module.exports = { ], }], }, + options: { + legend: { + labels: { + fontSize: 14, + fontStyle: 'bold', + } + }, + scales: { + yAxes: [{ ticks: { fontStyle: 'bold' } }], + xAxes: [{ ticks: { fontStyle: 'bold' } }], + }, + }, }; const encodedChart = encodeURIComponent(JSON.stringify(chart)); @@ -221,14 +245,22 @@ module.exports = { }], }, options: { + legend: { + labels: { + fontSize: 14, + fontStyle: 'bold', + } + }, scales: { // Gives comfortable margin to the top of the y-axis yAxes: [{ ticks: { + fontStyle: 'bold', min: Math.round(Math.min(...data)/10)*10 - 10, max: Math.round(Math.max(...data)/10)*10 + 10, }, - }] + }], + xAxes: [{ ticks: { fontStyle: 'bold' } }], }, // Gives a margin to the right of the whole graph layout: { diff --git a/commands/weapon-stats.js b/commands/weapon-stats.js index bb4e145..1877c01 100644 --- a/commands/weapon-stats.js +++ b/commands/weapon-stats.js @@ -105,7 +105,7 @@ module.exports = { let stats = new EmbedBuilder() .setColor(client.config.Colors.Default) - .setDescription(`${tag} stats for the ${weapon}`) + .setDescription(`${tag} stats for the **${weapon}**`) .setThumbnail(weapons[weaponClass][weapon]) .addFields( { name: `Shots Landed`, value: `${player.weaponStats[weapon].shotsLanded}`, inline: true }, @@ -138,6 +138,18 @@ module.exports = { ], }], }, + options: { + legend: { + labels: { + fontSize: 14, + fontStyle: 'bold', + } + }, + scales: { + yAxes: [{ ticks: { fontStyle: 'bold' } }], + xAxes: [{ ticks: { fontStyle: 'bold' } }], + }, + }, }; const encodedChart = encodeURIComponent(JSON.stringify(chart)); diff --git a/package.json b/package.json index 585a68b..9bd13c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dayzr-bot", - "version": "12.3.4", + "version": "12.3.5", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "main": "index.js", "nodemonConfig": {