mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-04-25 23:29:58 -07:00
app: flatten lightweight-chart scripts
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
interface PriceSeriesOptions {
|
||||
placement?: "top" | "bottom";
|
||||
title?: string;
|
||||
id?: string;
|
||||
inverseColors?: boolean;
|
||||
seriesOptions?: DeepPartial<SeriesOptionsCommon>;
|
||||
priceScaleOptions?: DeepPartial<PriceScaleOptions>;
|
||||
}
|
||||
@@ -4,8 +4,8 @@ import {
|
||||
CrosshairMode,
|
||||
} from "lightweight-charts";
|
||||
|
||||
import { colors } from "../../utils/colors";
|
||||
import { valueToString } from "../../utils/locale";
|
||||
import { colors } from "../utils/colors";
|
||||
import { valueToString } from "../utils/locale";
|
||||
import { HorzScaleBehaviorHeight } from "./horzScaleBehavior";
|
||||
|
||||
export function createChart(
|
||||
@@ -1,6 +1,6 @@
|
||||
import { colors } from "/src/scripts/utils/colors";
|
||||
|
||||
import { chunkIdToIndex } from "../../datasets/resource";
|
||||
import { chunkIdToIndex } from "../datasets/resource";
|
||||
|
||||
export function setMinMaxMarkers({
|
||||
scale,
|
||||
@@ -1,13 +0,0 @@
|
||||
interface BaselineSeriesOptions {
|
||||
color?: string;
|
||||
topColor?: string;
|
||||
topLineColor?: string;
|
||||
bottomColor?: string;
|
||||
bottomLineColor?: string;
|
||||
lineColor?: string;
|
||||
base?: number;
|
||||
options?: DeepPartialBaselineOptions;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
type SeriesLegend = ReturnType<typeof import("./legend").createSeriesLegend>;
|
||||
@@ -1,6 +1,6 @@
|
||||
import { HEIGHT_CHUNK_SIZE } from "../../datasets";
|
||||
import { debounce } from "../../utils/debounce";
|
||||
import { writeURLParam } from "../../utils/urlParams";
|
||||
import { HEIGHT_CHUNK_SIZE } from "../datasets";
|
||||
import { debounce } from "../utils/debounce";
|
||||
import { writeURLParam } from "../utils/urlParams";
|
||||
|
||||
const LOCAL_STORAGE_RANGE_KEY = "chart-range";
|
||||
const URL_PARAMS_RANGE_FROM_KEY = "from";
|
||||
24
app/src/scripts/lightweightCharts/types.d.ts
vendored
Normal file
24
app/src/scripts/lightweightCharts/types.d.ts
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
interface PriceSeriesOptions {
|
||||
placement?: "top" | "bottom";
|
||||
title?: string;
|
||||
id?: string;
|
||||
inverseColors?: boolean;
|
||||
seriesOptions?: DeepPartial<SeriesOptionsCommon>;
|
||||
priceScaleOptions?: DeepPartial<PriceScaleOptions>;
|
||||
}
|
||||
|
||||
interface BaselineSeriesOptions {
|
||||
color?: string;
|
||||
topColor?: string;
|
||||
topLineColor?: string;
|
||||
bottomColor?: string;
|
||||
bottomLineColor?: string;
|
||||
lineColor?: string;
|
||||
base?: number;
|
||||
options?: DeepPartialBaselineOptions;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
type SeriesLegend = ReturnType<
|
||||
typeof import("../../chart/legend").createSeriesLegend
|
||||
>;
|
||||
@@ -1,5 +1,5 @@
|
||||
import { dateToString, getNumberOfDaysBetweenTwoDates } from "../../utils/date";
|
||||
import { createLineSeries } from "../series/creators/line";
|
||||
import { dateToString, getNumberOfDaysBetweenTwoDates } from "../utils/date";
|
||||
import { createLineSeries } from "./line";
|
||||
|
||||
export const GENESIS_DAY = "2009-01-03";
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { createRWS } from "/src/solid/rws";
|
||||
|
||||
import { chunkIdToIndex } from "../datasets/resource";
|
||||
import { createChart } from "../lightweightCharts/chart/create";
|
||||
import { setMinMaxMarkers } from "../lightweightCharts/chart/markers";
|
||||
import { initTimeScale } from "../lightweightCharts/chart/time";
|
||||
import { setWhitespace } from "../lightweightCharts/chart/whitespace";
|
||||
import {
|
||||
createBaseLineSeries,
|
||||
DEFAULT_BASELINE_COLORS,
|
||||
} from "../lightweightCharts/series/creators/baseLine";
|
||||
import { createCandlesticksSeries } from "../lightweightCharts/series/creators/candlesticks";
|
||||
import { createHistogramSeries } from "../lightweightCharts/series/creators/histogram";
|
||||
import { createSeriesLegend } from "../lightweightCharts/series/creators/legend";
|
||||
import { createLineSeries } from "../lightweightCharts/series/creators/line";
|
||||
} from "../lightweightCharts/baseLine";
|
||||
import { createCandlesticksSeries } from "../lightweightCharts/candlesticks";
|
||||
import { createChart } from "../lightweightCharts/create";
|
||||
import { createHistogramSeries } from "../lightweightCharts/histogram";
|
||||
import { createSeriesLegend } from "../lightweightCharts/legend";
|
||||
import { createLineSeries } from "../lightweightCharts/line";
|
||||
import { setMinMaxMarkers } from "../lightweightCharts/markers";
|
||||
import { initTimeScale } from "../lightweightCharts/time";
|
||||
import { setWhitespace } from "../lightweightCharts/whitespace";
|
||||
import { colors } from "../utils/colors";
|
||||
import { debounce } from "../utils/debounce";
|
||||
import { stringToId } from "../utils/id";
|
||||
|
||||
Reference in New Issue
Block a user