fix(analytics): ObjectSaleChart tooltip полный ₽/м², не /1000 (#1238) #1275
1 changed files with 6 additions and 2 deletions
|
|
@ -56,10 +56,14 @@ export function ObjectSaleChart({ objId }: { objId: number | string }) {
|
||||||
yAxisIndex: 1,
|
yAxisIndex: 1,
|
||||||
smooth: true,
|
smooth: true,
|
||||||
symbol: "circle",
|
symbol: "circle",
|
||||||
data: d.price.map((v) => (v ? Math.round(v / 1000) : null)),
|
data: d.price.map((v) => (v ? Math.round(v) : null)),
|
||||||
lineStyle: { color: type === "apartments" ? "#0a7a3a" : "#c2410c" },
|
lineStyle: { color: type === "apartments" ? "#0a7a3a" : "#c2410c" },
|
||||||
itemStyle: { color: type === "apartments" ? "#0a7a3a" : "#c2410c" },
|
itemStyle: { color: type === "apartments" ? "#0a7a3a" : "#c2410c" },
|
||||||
connectNulls: true,
|
connectNulls: true,
|
||||||
|
tooltip: {
|
||||||
|
valueFormatter: (v: number | null) =>
|
||||||
|
v == null ? "—" : `${v.toLocaleString("ru")} ₽/м²`,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
return {
|
return {
|
||||||
|
|
@ -69,7 +73,7 @@ export function ObjectSaleChart({ objId }: { objId: number | string }) {
|
||||||
xAxis: { type: "category", data: months },
|
xAxis: { type: "category", data: months },
|
||||||
yAxis: [
|
yAxis: [
|
||||||
{ type: "value", name: "шт", position: "left" },
|
{ type: "value", name: "шт", position: "left" },
|
||||||
{ type: "value", name: "тыс ₽/м²", position: "right" },
|
{ type: "value", name: "₽/м²", position: "right" },
|
||||||
],
|
],
|
||||||
series,
|
series,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue