From c50824adb605c6f0653c9b707693a45da4380108 Mon Sep 17 00:00:00 2001 From: tim Date: Thu, 10 Apr 2025 17:51:40 -0400 Subject: [PATCH] fill shape color touchup --- src/charts/ordershapes.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) }