feat: expenses in statistics
This commit is contained in:
@@ -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]}
|
||||
|
||||
Reference in New Issue
Block a user