File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -188,13 +188,17 @@ const apartsCountsByDaysChart = computed(() => {
188188});
189189
190190const listedVsUnlistedPriceByDays = computed (() => {
191- return data .value .listedVsUnlistedPriceByDays ?.map (
192- (item ) => ({
193- x: dayjs (item .day ).format (' DD MMM' ),
194- listedPrice: item .listedPrice .toFixed (2 ),
195- unlistedPrice: item .unlistedPrice .toFixed (2 ),
196- })
197- );
191+ const arr = data .value ?.listedVsUnlistedPriceByDays ;
192+
193+ if (! Array .isArray (arr )) return [];
194+
195+ const reversed = arr .slice ().reverse ();
196+
197+ return reversed .map (item => ({
198+ x: dayjs (item .day ).format (' DD MMM' ),
199+ listedPrice: item .listedPrice .toFixed (2 ),
200+ unlistedPrice: item .unlistedPrice .toFixed (2 ),
201+ }));
198202});
199203
200204const listedVsUnlistedCountByDays = computed (() => {
You can’t perform that action at this time.
0 commit comments