feat: expenses in statistics

This commit is contained in:
2024-11-24 19:23:33 +04:00
parent 2007ecd2f2
commit e3146832a5
5 changed files with 49 additions and 20 deletions

View File

@@ -26,6 +26,7 @@ export const ProfitChart = () => {
[
{ name: "profit", label: "Прибыль", color: "indigo.6" },
{ name: "revenue", label: "Выручка", color: "teal.6" },
{ name: "expenses", label: "Расходы", color: "red.6" },
],
[
{ name: "dealsCount", label: "Количество сделок", color: "indigo.6" },
@@ -34,6 +35,8 @@ export const ProfitChart = () => {
const units = ["₽", "шт"];
const chartSizes = ["42vh", "28vh"];
return (
<div className={styles["profit-chart-container"]}>
<Total profitData={profitData} />
@@ -42,13 +45,13 @@ export const ProfitChart = () => {
form={form}
/>
<Skeleton visible={isLoading}>
<Stack gap={"xl"}>
<Stack gap="20px">
{getChartsSeries.map((series, idx) => {
return (
<AreaChart
my={"sm"}
w={"98%"}
h={"34vh"}
h={chartSizes[idx]}
data={formattedProfitData}
dataKey="date"
unit={units[idx]}