fill shape color touchup

This commit is contained in:
tim
2025-04-10 17:51:40 -04:00
parent 257c476cc1
commit c50824adb6

View File

@@ -1,6 +1,6 @@
import {DISTANT_FUTURE, DISTANT_PAST, MAX_FRACTION} from "@/blockchain/orderlib.js"; import {DISTANT_FUTURE, DISTANT_PAST, MAX_FRACTION} from "@/blockchain/orderlib.js";
import {allocationText, DLine, HLine} from "@/charts/shape.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 {sideColor} from "@/misc.js";
import {useChartOrderStore} from "@/orderbuild.js"; import {useChartOrderStore} from "@/orderbuild.js";
import {timestamp} from "@/common.js"; import {timestamp} from "@/common.js";
@@ -88,8 +88,10 @@ class TrancheShapes {
// console.log('price', price) // console.log('price', price)
const channel = buy?'low':'high'; const channel = buy?'low':'high';
const text = allocationText(buy, weight, amount, amountSymbol, amountIsBase ? null : this.symbol.base.s, 1, '\n') 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}) const color = sideColor(buy);
// console.log('created fill shape at', time, price) 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) this.fills.push(s)
} }