From b32b18adc680c815eb15a29acf2a85ef2bb8f44f Mon Sep 17 00:00:00 2001 From: Adam Roe Date: Wed, 14 Aug 2024 19:29:32 +1000 Subject: [PATCH] Update graph colours --- .../components/weatherCharts/DailyChart/index.js | 14 +++++++------- .../components/weatherCharts/HourlyChart/index.js | 13 ++++++------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/client/src/components/weatherCharts/DailyChart/index.js b/client/src/components/weatherCharts/DailyChart/index.js index d995896..e1e3c91 100644 --- a/client/src/components/weatherCharts/DailyChart/index.js +++ b/client/src/components/weatherCharts/DailyChart/index.js @@ -27,12 +27,11 @@ const createChartOptions = ({ stacked: false, title: { display: true, - /*text: `5 Day ${ + text: `5-Day ${ altMode - ? `Wind Speed / Precipitation (${lengthUnit})` - : `Temp / Precipitation` - }`,*/ - text: "Five-Day Forecast", + ? `Wind / Rain (${lengthUnit})` + : `Temperature / Rain (%)` + }`, fontColor: fontColor(darkMode), fontFamily: "Rubik, sans-serif", }, @@ -89,6 +88,7 @@ const chartColors = { blue: "rgba(63, 127, 191, 0.5)", gray: "rgba(127, 127, 127, 0.5)", orange: "rgba(226, 99, 71)", + white: "rgba(255, 255, 255)", }; const mapChartData = ({ @@ -122,8 +122,8 @@ const mapChartData = ({ : convertTemp(temperature, tempUnit); }), yAxisID: "y-axis-1", - borderColor: chartColors.orange, - backgroundColor: chartColors.orange, + borderColor: altMode ? chartColors.gray : chartColors.orange, + backgroundColor: altMode ? chartColors.gray : chartColors.orange, fill: false, }, { diff --git a/client/src/components/weatherCharts/HourlyChart/index.js b/client/src/components/weatherCharts/HourlyChart/index.js index 493cf23..cbe4608 100644 --- a/client/src/components/weatherCharts/HourlyChart/index.js +++ b/client/src/components/weatherCharts/HourlyChart/index.js @@ -27,12 +27,11 @@ const chartOptions = ({ stacked: false, title: { display: true, - /*text: `24 Hour ${ + text: `24-Hour ${ altMode - ? `Wind Speed / Precipitation (${lengthUnit})` - : `Temp / Precipitation` - }`,*/ - text: "24-hour Forecast", + ? `Wind / Rain (${lengthUnit})` + : `Temperature / Rain (%)` + }`, fontColor: fontColor(darkMode), fontFamily: "Rubik, sans-serif", }, @@ -127,8 +126,8 @@ const mapChartData = ({ : convertTemp(temperature, tempUnit); }), yAxisID: "y-axis-1", - borderColor: chartColors.orange, - backgroundColor: chartColors.orange, + borderColor: altMode ? chartColors.gray : chartColors.orange, + backgroundColor: altMode ? chartColors.gray : chartColors.orange, fill: false, }, {