We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eba9649 commit 94eb88dCopy full SHA for 94eb88d
1 file changed
src/components/Dashboard/Chart/depthCanvas.ts
@@ -196,13 +196,15 @@ export function drawDepthChart(
196
? (stats.bestBid + stats.bestAsk) / 2
197
: price ?? 0;
198
199
- const bidEdgePts = visibleBids.length > 0
+ // 买方:按价格升序排列(从左到右),累积量从大到小
200
+ const sortedBids = [...visibleBids].reverse();
201
+ const bidEdgePts = sortedBids.length > 0
202
? [
- { price: priceRange.min, cumVolume: visibleBids[0].cumVolume },
- ...visibleBids,
203
+ { price: priceRange.min, cumVolume: sortedBids[0].cumVolume },
204
+ ...sortedBids,
205
{ price: dynamicMid, cumVolume: 0 },
206
]
- : visibleBids;
207
+ : sortedBids;
208
const askEdgePts = visibleAsks.length > 0
209
210
0 commit comments