mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-30 01:20:00 -07:00
global: cost basis -> urpd
This commit is contained in:
@@ -58,7 +58,7 @@ export function init() {
|
||||
title: "Price",
|
||||
series: spot.sats,
|
||||
ohlcSeries: ohlc.sats,
|
||||
colors: /** @type {const} */ ([colors.bi.p1[1], colors.bi.p1[0]]),
|
||||
colors: /** @type {const} */ ([colors.default, colors.background]),
|
||||
}),
|
||||
...(optionTop.get(Unit.sats) ?? []),
|
||||
]);
|
||||
|
||||
@@ -840,13 +840,13 @@ export function createChart({ parent, brk, fitContent }) {
|
||||
defaultActive,
|
||||
options,
|
||||
}) {
|
||||
const upColor = customColors?.[0] ?? colors.bi.p1[0];
|
||||
const downColor = customColors?.[1] ?? colors.bi.p1[1];
|
||||
const upColor = customColors?.[0] ?? colors.background;
|
||||
const downColor = customColors?.[1] ?? colors.default;
|
||||
|
||||
const candlestickISeries = /** @type {CandlestickISeries} */ (
|
||||
ichart.addSeries(
|
||||
/** @type {SeriesDefinition<'Candlestick'>} */ (CandlestickSeries),
|
||||
{ visible: false, borderVisible: false, ...options },
|
||||
{ visible: false, borderVisible: true, ...options },
|
||||
paneIndex,
|
||||
)
|
||||
);
|
||||
@@ -889,10 +889,13 @@ export function createChart({ parent, brk, fitContent }) {
|
||||
candlestickISeries.applyOptions({
|
||||
visible: active && !showLine,
|
||||
lastValueVisible: highlighted,
|
||||
priceLineColor: colors.default.highlight(highlighted),
|
||||
upColor: upColor.highlight(highlighted),
|
||||
downColor: downColor.highlight(highlighted),
|
||||
wickUpColor: upColor.highlight(highlighted),
|
||||
wickDownColor: downColor.highlight(highlighted),
|
||||
wickUpColor: colors.default.highlight(highlighted),
|
||||
wickDownColor: colors.default.highlight(highlighted),
|
||||
borderUpColor: colors.default.highlight(highlighted),
|
||||
borderDownColor: colors.default.highlight(highlighted),
|
||||
});
|
||||
lineISeries.applyOptions({
|
||||
visible: active && showLine,
|
||||
|
||||
@@ -125,6 +125,7 @@ function seq(keys) {
|
||||
export const colors = {
|
||||
transparent: createColor(() => "transparent"),
|
||||
default: createColor(() => getLightDarkValue("--color")),
|
||||
background: createColor(() => getLightDarkValue("--background-color")),
|
||||
gray: createColor(() => getColor("gray")),
|
||||
border: createColor(() => getLightDarkValue("--border-color")),
|
||||
offBorder: createColor(() => getLightDarkValue("--off-border-color")),
|
||||
|
||||
Reference in New Issue
Block a user