diff --git a/src/charts/ordershapes.js b/src/charts/ordershapes.js index d278d09..56aed66 100644 --- a/src/charts/ordershapes.js +++ b/src/charts/ordershapes.js @@ -1,6 +1,6 @@ import {DISTANT_FUTURE, DISTANT_PAST, MAX_FRACTION} from "@/blockchain/orderlib.js"; import {allocationText, DLine, HLine} from "@/charts/shape.js"; -import {createShape, deleteShapeId} from "@/charts/chart.js"; +import {createShape, deleteShapeId, widget} from "@/charts/chart.js"; import {sideColor} from "@/misc.js"; import {useChartOrderStore} from "@/orderbuild.js"; import {timestamp} from "@/common.js"; @@ -88,8 +88,10 @@ class TrancheShapes { // console.log('price', price) const channel = buy?'low':'high'; const text = allocationText(buy, weight, amount, amountSymbol, amountIsBase ? null : this.symbol.base.s, 1, '\n') - const s = createShape(buy?'arrow_up':'arrow_down', {time, price}, {channel,text,lock:true}) - // console.log('created fill shape at', time, price) + const color = sideColor(buy); + const options = {channel,text,lock:true,overrides:{color: color, arrowColor: color}}; + const s = createShape(buy?'arrow_up':'arrow_down', {time, price}, options) + console.log('created fill shape at', time, price, widget.activeChart().getShapeById(s).getProperties()) this.fills.push(s) }