diff --git a/src/components/DailyCharts.js b/src/components/DailyCharts.js index bc5449d..152da11 100644 --- a/src/components/DailyCharts.js +++ b/src/components/DailyCharts.js @@ -165,10 +165,10 @@ const DailyCharts = ({ incomeGraph, transactionGraph, materialGraph, colors, typ }, }, yaxis: { - show: false, max: globalMax, min: 0, labels: { + maxWidth: 20, style: { colors: "transparent", }, diff --git a/src/components/PeriodCharts.js b/src/components/PeriodCharts.js index dd175b2..f0c9617 100644 --- a/src/components/PeriodCharts.js +++ b/src/components/PeriodCharts.js @@ -105,7 +105,8 @@ if (aggregatedCurrentReports || aggregatedPreviousReports) { } } }, - yaxis: { show: false, max: globalMax, min: 0, labels: { style: { colors: "transparent" } } }, + yaxis: { max: globalMax, min: 0, labels: { + maxWidth: 20, style: { colors: "transparent" } } }, grid: { show: false }, fill: { opacity: 0.5 }, colors: [colors[0]], @@ -166,7 +167,7 @@ if (aggregatedCurrentReports || aggregatedPreviousReports) { } } }, - yaxis: { show: false, max: globalMax, min: 0, labels: { style: { colors: "transparent" } } }, + yaxis: { max: globalMax, min: 0, labels: { maxWidth: 20, style: { colors: "transparent" } } }, grid: { show: false }, fill: { opacity: 0.5 }, colors: [colors[1]], diff --git a/src/pages/Reports.js b/src/pages/Reports.js index 8613949..6f4de53 100644 --- a/src/pages/Reports.js +++ b/src/pages/Reports.js @@ -173,7 +173,7 @@ const App = ({ forCafe = true, cafeId = -1, const cafeTotal = (cafe.report?.itemSales || []).reduce((sum, item) => sum + item.sold, 0); return total + cafeTotal; }, 0); - + console.log(totalSoldAcrossAllCafes) const totalSpendAcrossAllCafes = filteredItems.reduce((total, cafe) => { const cafeTotal = (cafe.report?.materialSpend || []).reduce((sum, item) => sum + item.spend, 0); return total + cafeTotal; @@ -484,11 +484,13 @@ const App = ({ forCafe = true, cafeId = -1, invert={false} loading={loading} /> - {analytics?.itemSales && - analytics?.itemSales.length > 0 && ( +

{segments[0]?.itemName}

+ {((analytics?.itemSales && + analytics?.itemSales.length > 0) || (!analytics?.itemSales && segments.length > 0)) && ( )}