From 8af1ddd10d328402bcdc48c56d453172dcfedf40 Mon Sep 17 00:00:00 2001 From: nym21 Date: Wed, 4 Dec 2024 10:28:30 +0100 Subject: [PATCH] website: moved more code to lc wrapper --- website/index.html | 7 +- .../packages/lightweight-charts/types.d.ts | 8 +- .../packages/lightweight-charts/wrapper.js | 105 ++++++++++-- website/scripts/chart.js | 157 ++++-------------- website/scripts/main.js | 27 ++- website/scripts/simulation.js | 89 +++------- 6 files changed, 178 insertions(+), 215 deletions(-) diff --git a/website/index.html b/website/index.html index 4c4878329..b649580b9 100644 --- a/website/index.html +++ b/website/index.html @@ -1547,7 +1547,12 @@ Bitcoin is hope - 🕊️ + diff --git a/website/packages/lightweight-charts/types.d.ts b/website/packages/lightweight-charts/types.d.ts index 4da1bc23b..02c5ab127 100644 --- a/website/packages/lightweight-charts/types.d.ts +++ b/website/packages/lightweight-charts/types.d.ts @@ -12,7 +12,7 @@ import { ISeriesApi, BaselineData, } from "./v4.2.0/types"; -import { Color, ValuedCandlestickData } from "../../scripts/types/self"; +import { Color, Valued, ValuedCandlestickData } from "../../scripts/types/self"; interface BaseSeriesBlueprint { title: string; @@ -28,7 +28,7 @@ interface CandlestickSeriesBlueprint extends BaseSeriesBlueprint { type: "Candlestick"; color?: Color; options?: DeepPartial; - data?: Accessor[]>; + data?: Accessor<(CandlestickData