website: fix options

This commit is contained in:
nym21
2025-08-10 14:16:13 +02:00
parent ce9b4bc4dd
commit bd8c4dfb6b
16 changed files with 77 additions and 37 deletions

View File

@@ -8,6 +8,7 @@ package.version = "0.0.87"
package.homepage = "https://bitcoinresearchkit.org"
package.repository = "https://github.com/bitcoinresearchkit/brk"
package.readme = "README.md"
package.rust-version = "1.89"
[profile.release]
lto = "fat"

View File

@@ -7,6 +7,7 @@ homepage.workspace = true
repository.workspace = true
edition.workspace = true
version.workspace = true
rust-version.workspace = true
build = "build.rs"
[features]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
version.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -8,6 +8,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -8,6 +8,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -6,6 +6,7 @@ edition.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
rust-version.workspace = true
build = "build.rs"
[dependencies]

View File

@@ -2109,29 +2109,38 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
{
name: "sopr",
title: `Spent Output Profit Ratio ${title}`,
bottom: list.flatMap(({ color, name, key }) => [
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline",
key: `${fixKey(key)}spent_output_profit_ratio`,
title: "sopr",
options: {
createPriceLine: {
value: 1,
bottom: list.flatMap(({ color, name, key }) => {
const soprKey = `${fixKey(key)}spent_output_profit_ratio`;
const asoprKey = `${fixKey(key)}adjusted_spent_output_profit_ratio`;
return [
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline",
key: soprKey,
title: "sopr",
options: {
createPriceLine: {
value: 1,
},
},
},
}),
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline",
key: `${fixKey(key)}adjusted_spent_output_profit_ratio`,
title: "asopr",
colors: [colors.yellow, colors.pink],
options: {
createPriceLine: {
value: 1,
},
},
}),
]),
}),
...(asoprKey in vecIdToIndexes
? [
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline",
key: asoprKey,
title: "asopr",
colors: [colors.yellow, colors.pink],
options: {
createPriceLine: {
value: 1,
},
},
}),
]
: []),
];
}),
},
]
: [
@@ -2333,25 +2342,41 @@ function createPartialOptions({ env, colors, vecIdToIndexes }) {
}),
]),
},
{
name: "Adjusted",
title: `Adjusted Spent Output Profit Ratio ${title}`,
bottom: list.flatMap(({ color, name, key }) => [
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline",
...(() => {
const reducedList = list
.map(({ color, name, key }) => ({
color,
name,
key: `${fixKey(
key,
)}adjusted_spent_output_profit_ratio`,
title: name,
color,
options: {
createPriceLine: {
value: 1,
}))
.filter(({ key }) => key in vecIdToIndexes);
return reducedList.length
? [
{
name: "Adjusted",
title: `Adjusted Spent Output Profit Ratio ${title}`,
bottom: reducedList.flatMap(
({ color, name, key }) => [
/** @satisfies {FetchedBaselineSeriesBlueprint} */ ({
type: "Baseline",
key,
title: name,
color,
options: {
createPriceLine: {
value: 1,
},
},
}),
],
),
},
},
}),
]),
},
]
: [];
})(),
],
},
]),