website: simulation: small fixes

This commit is contained in:
k
2024-11-28 15:58:11 +01:00
parent 71871901ef
commit 4dac44e720
6 changed files with 53 additions and 98 deletions

View File

@@ -662,10 +662,10 @@ function initPackages() {
const id = `chart-${chartId}-${chartIndex}-mode`;
const chartModes = /** @type {const} */ (["Linear", "Log"]);
const chartModes = /** @type {const} */ (["Lin", "Log"]);
const chartMode = signals.createSignal(
/** @type {Lowercase<typeof chartModes[number]>} */ (
localStorage.getItem(id) || "linear"
localStorage.getItem(id) || "lin"
),
);
@@ -687,7 +687,7 @@ function initPackages() {
signals.createEffect(chartMode, (chartMode) =>
_chart.priceScale("right").applyOptions({
mode: chartMode === "linear" ? 0 : 1,
mode: chartMode === "lin" ? 0 : 1,
}),
);
}