diff --git a/src/SliderCheckbox.vue b/src/SliderCheckbox.vue new file mode 100644 index 0000000..e66a222 --- /dev/null +++ b/src/SliderCheckbox.vue @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/src/formaters.ts b/src/formaters.ts index 0fd71ce..4287730 100644 --- a/src/formaters.ts +++ b/src/formaters.ts @@ -7,4 +7,8 @@ export const formatIsk = (value: number | bigint) => iskFormater.format(value) + export const percentFormater = new Intl.NumberFormat("en-US", { style: "percent", minimumFractionDigits: 0 +}); + +export const twoDigitFormater = new Intl.NumberFormat("en-US", { + maximumFractionDigits: 2 }); \ No newline at end of file diff --git a/src/market/scan/HistoryQuartils.ts b/src/market/scan/HistoryQuartils.ts index d7f6872..c846a32 100644 --- a/src/market/scan/HistoryQuartils.ts +++ b/src/market/scan/HistoryQuartils.ts @@ -2,6 +2,7 @@ import { MarketOrderHistory } from "@/market"; export type HistoryQuartils = { totalVolume: number, + totalOrders: number, q1: number, median: number, q3: number, @@ -10,6 +11,7 @@ export type HistoryQuartils = { export const getHistoryQuartils = (history: MarketOrderHistory[], days?: number): HistoryQuartils => { const now = Date.now(); + let totalOrders = 0; const volumes = history .flatMap(h => { const volume = h.volume; @@ -20,6 +22,7 @@ export const getHistoryQuartils = (history: MarketOrderHistory[], days?: number) const e = estimateVolume(h); + totalOrders += h.order_count; return [[h.highest, e], [h.lowest, volume - e]]; }) .filter(h => h[1] > 0) @@ -45,6 +48,7 @@ export const getHistoryQuartils = (history: MarketOrderHistory[], days?: number) } return { totalVolume, + totalOrders, q1: quartils[0], median: quartils[1], q3: quartils[2], diff --git a/src/market/scan/ScanResultTable.vue b/src/market/scan/ScanResultTable.vue index ccf1fb1..ccfb620 100644 --- a/src/market/scan/ScanResultTable.vue +++ b/src/market/scan/ScanResultTable.vue @@ -1,5 +1,6 @@ - - + + Profit Threshold: @@ -82,6 +88,9 @@ const getLineColor = (result: Result) => { Days: + + Show only cheap items + Filter: @@ -98,6 +107,7 @@ const getLineColor = (result: Result) => { Median Q3 Profit + Score @@ -111,7 +121,8 @@ const getLineColor = (result: Result) => { {{ formatIsk(r.q1) }} {{ formatIsk(r.mmedian) }} {{ formatIsk(r.q3) }} - {{ percentFormater.format(r.profit) }} + {{ percentFormater.format(r.profit) }} + {{ twoDigitFormater.format(r.score) }} diff --git a/src/table/SortableHeader.vue b/src/table/SortableHeader.vue index 70e33bf..cd5a412 100644 --- a/src/table/SortableHeader.vue +++ b/src/table/SortableHeader.vue @@ -29,7 +29,7 @@ th { @apply relative h-8 pe-3; } span.asc, span.desc { - @apply absolute end-2 cursor-pointer text-xs; + @apply absolute end-1 cursor-pointer text-xs; } span.asc { @apply top-0.5;