mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-07-13 03:58:12 -07:00
website: snapshot
This commit is contained in:
@@ -1550,13 +1550,10 @@ export function createChart({ parent, id: chartId, brk, fitContent }) {
|
||||
if (!td) return;
|
||||
|
||||
// Remove previous if any
|
||||
td.querySelector(".scale-selector")?.remove();
|
||||
td.querySelector(":scope > .field")?.remove();
|
||||
|
||||
/** @type {HTMLTableCellElement} */ (td).style.position = "relative";
|
||||
|
||||
const wrapper = window.document.createElement("div");
|
||||
wrapper.classList.add("scale-selector");
|
||||
|
||||
const radios = createRadios({
|
||||
choices: /** @type {const} */ (["lin", "log"]),
|
||||
id: stringToId(`${id} ${paneIndex}`),
|
||||
@@ -1570,8 +1567,7 @@ export function createChart({ parent, id: chartId, brk, fitContent }) {
|
||||
} catch {}
|
||||
},
|
||||
});
|
||||
wrapper.append(radios);
|
||||
td.append(wrapper);
|
||||
td.append(radios);
|
||||
}
|
||||
|
||||
const blueprints = {
|
||||
@@ -1738,13 +1734,7 @@ export function createChart({ parent, id: chartId, brk, fitContent }) {
|
||||
/** @type {HTMLElement | null} */
|
||||
let indexField = null;
|
||||
|
||||
const indexWrapper = window.document.createElement("div");
|
||||
indexWrapper.classList.add("index-selector");
|
||||
|
||||
const lastTr = ichart.chartElement().querySelector("table > tr:last-child");
|
||||
if (lastTr) {
|
||||
lastTr.append(indexWrapper);
|
||||
}
|
||||
|
||||
const chart = {
|
||||
index,
|
||||
@@ -1770,7 +1760,7 @@ export function createChart({ parent, id: chartId, brk, fitContent }) {
|
||||
choices,
|
||||
id: "index",
|
||||
});
|
||||
indexWrapper.append(indexField);
|
||||
if (lastTr) lastTr.append(indexField);
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -112,7 +112,6 @@ export function createValuationSection({ cohort, title }) {
|
||||
baseline({
|
||||
metric: tree.realized.realizedPriceExtra.ratio,
|
||||
name: "MVRV",
|
||||
color,
|
||||
unit: Unit.ratio,
|
||||
base: 1,
|
||||
}),
|
||||
@@ -175,7 +174,11 @@ export function createGroupedValuationSection({ list, all, title }) {
|
||||
* @param {{ list: readonly (CohortAll | CohortFull | CohortWithPercentiles)[], all: CohortAll, title: (metric: string) => string }} args
|
||||
* @returns {PartialOptionsGroup}
|
||||
*/
|
||||
export function createGroupedValuationSectionWithOwnMarketCap({ list, all, title }) {
|
||||
export function createGroupedValuationSectionWithOwnMarketCap({
|
||||
list,
|
||||
all,
|
||||
title,
|
||||
}) {
|
||||
return {
|
||||
name: "Valuation",
|
||||
tree: [
|
||||
|
||||
Reference in New Issue
Block a user