react-candlesticks 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +219 -0
- package/dist/components/Chart/Chart.d.ts +36 -0
- package/dist/components/Chart/ChartWithPropTypes.d.ts +7 -0
- package/dist/components/Chart/chartPropTypes.d.ts +21 -0
- package/dist/components/Chart/index.d.ts +8 -0
- package/dist/components/Chart/parseConfigComponents.d.ts +19 -0
- package/dist/components/ChartCanvases/ChartCanvases.d.ts +26 -0
- package/dist/components/ChartCanvases/index.d.ts +8 -0
- package/dist/components/InteractiveArea/InteractiveArea.d.ts +13 -0
- package/dist/components/InteractiveArea/index.d.ts +8 -0
- package/dist/components/StatefulChart/StatefulChart.d.ts +26 -0
- package/dist/components/StatefulChart/getViewportData.d.ts +6 -0
- package/dist/components/StatefulChart/index.d.ts +8 -0
- package/dist/components/UIs/PanelUIs/Legend/Legend.d.ts +13 -0
- package/dist/components/UIs/PanelUIs/PanelControls/PanelControls.d.ts +13 -0
- package/dist/components/UIs/PanelUIs/PanelUIs.d.ts +16 -0
- package/dist/components/UIs/UIs.d.ts +23 -0
- package/dist/components/index.d.ts +8 -0
- package/dist/config/chart/ChartConfig.d.ts +19 -0
- package/dist/config/chart/borders/BordersConfig.d.ts +21 -0
- package/dist/config/chart/borders/parseBordersConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/CrosshairsConfig.d.ts +14 -0
- package/dist/config/chart/crosshairs/parseCrosshairsConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/timeCrosshair/TimeCrosshairConfig.d.ts +14 -0
- package/dist/config/chart/crosshairs/timeCrosshair/parseTimeCrosshairConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/CrosshairTimeFormat.d.ts +7 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/TimeCrosshairLabelConfig.d.ts +10 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/TimeCrosshairLabelFormatter.d.ts +7 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/defaultTimeCrosshairLabelFormatter.d.ts +3 -0
- package/dist/config/chart/crosshairs/timeCrosshair/timeCrosshairLabel/parseTimeCrosshairLabelConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/valueCrosshair/ValueCrosshairConfig.d.ts +14 -0
- package/dist/config/chart/crosshairs/valueCrosshair/parseValueCrosshairConfig.d.ts +3 -0
- package/dist/config/chart/crosshairs/valueCrosshair/valueCrosshairLabel/ValueCrosshairLabelConfig.d.ts +5 -0
- package/dist/config/chart/crosshairs/valueCrosshair/valueCrosshairLabel/parseValueCrosshairLabelConfig.d.ts +3 -0
- package/dist/config/chart/grid/GridConfig.d.ts +13 -0
- package/dist/config/chart/grid/parseGridConfig.d.ts +3 -0
- package/dist/config/chart/parseChartConfig.d.ts +4 -0
- package/dist/config/chart/xAxis/XAxisConfig.d.ts +23 -0
- package/dist/config/chart/xAxis/parseXAxisConfig.d.ts +3 -0
- package/dist/config/elements/bar/BarConfig.d.ts +20 -0
- package/dist/config/elements/bar/DirectionalBarConfig.d.ts +17 -0
- package/dist/config/elements/bar/parseBarConfig.d.ts +3 -0
- package/dist/config/elements/bar/parseDirectionalBarConfig.d.ts +3 -0
- package/dist/config/elements/boxedTimeLabel/BoxedTimeLabelConfig.d.ts +23 -0
- package/dist/config/elements/boxedTimeLabel/parseBoxedTimeLabelConfig.d.ts +3 -0
- package/dist/config/elements/boxedValueLabel/BoxedValueLabelConfig.d.ts +23 -0
- package/dist/config/elements/boxedValueLabel/parseBoxedValueLabelConfig.d.ts +3 -0
- package/dist/config/elements/button/ButtonConfig.d.ts +21 -0
- package/dist/config/elements/button/parseButtonConfig.d.ts +3 -0
- package/dist/config/elements/label/Font.d.ts +9 -0
- package/dist/config/elements/label/LabelConfig.d.ts +27 -0
- package/dist/config/elements/label/parseLabelConfig.d.ts +3 -0
- package/dist/config/elements/line/DirectionalLineConfig.d.ts +17 -0
- package/dist/config/elements/line/LineConfig.d.ts +28 -0
- package/dist/config/elements/line/parseDirectionalLineConfig.d.ts +3 -0
- package/dist/config/elements/line/parseLineConfig.d.ts +3 -0
- package/dist/config/elements/timeLabel/TimeLabelConfig.d.ts +14 -0
- package/dist/config/elements/timeLabel/TimeLabelFormatter.d.ts +9 -0
- package/dist/config/elements/timeLabel/defaultTimeLabelFormatter.d.ts +3 -0
- package/dist/config/elements/timeLabel/parseTimeLabelConfig.d.ts +3 -0
- package/dist/config/elements/valueLabel/ValueLabelConfig.d.ts +11 -0
- package/dist/config/elements/valueLabel/defaultValueLabelFormatter.d.ts +8 -0
- package/dist/config/elements/valueLabel/parseValueLabelConfig.d.ts +3 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/layer/BaseLayerConfig.d.ts +81 -0
- package/dist/config/layer/Layer.d.ts +17 -0
- package/dist/config/layer/LayerConfig.d.ts +24 -0
- package/dist/config/layer/LayerType.d.ts +7 -0
- package/dist/config/layer/createLayerTopology.d.ts +9 -0
- package/dist/config/layer/inputSourceShorthand.d.ts +4 -0
- package/dist/config/layer/layerComponentNameToLayerTypeMap.d.ts +19 -0
- package/dist/config/layer/layerComponentTypeKey.d.ts +8 -0
- package/dist/config/layer/parseLayerConfig.d.ts +3 -0
- package/dist/config/layer/parseLayerConfigs.d.ts +3 -0
- package/dist/config/layer/parseLookback.d.ts +8 -0
- package/dist/config/layer/validateLayerInputs.d.ts +3 -0
- package/dist/config/layer/yAxis/YAxisConfig.d.ts +22 -0
- package/dist/config/layer/yAxis/parseYAxisConfig.d.ts +3 -0
- package/dist/config/legend/LegendConfig.d.ts +29 -0
- package/dist/config/legend/LegendFieldConfig.d.ts +31 -0
- package/dist/config/legend/parseLegendConfig.d.ts +4 -0
- package/dist/config/legend/parseLegendFieldConfig.d.ts +3 -0
- package/dist/config/legend/parseLegendFieldsConfig.d.ts +3 -0
- package/dist/config/panel/Panel.d.ts +7 -0
- package/dist/config/panel/PanelConfig.d.ts +30 -0
- package/dist/config/panel/controls/PanelControlsConfig.d.ts +10 -0
- package/dist/config/panel/controls/parsePanelControlsConfig.d.ts +3 -0
- package/dist/config/panel/parsePanelConfig.d.ts +4 -0
- package/dist/config/panel/parsePanelConfigs.d.ts +4 -0
- package/dist/config/panel/setPanelYAxes.d.ts +4 -0
- package/dist/config/utils/validateNumber.d.ts +9 -0
- package/dist/config/valueMarker/DirectionalValueMarkerConfig.d.ts +25 -0
- package/dist/config/valueMarker/ValueMarkerConfig.d.ts +19 -0
- package/dist/config/valueMarker/ValueMarkerMode.d.ts +7 -0
- package/dist/config/valueMarker/parseDirectionalValueMarkerConfig.d.ts +3 -0
- package/dist/config/valueMarker/parseValueMarkerConfig.d.ts +3 -0
- package/dist/data/layers/createLayersData.d.ts +4 -0
- package/dist/data/layers/createPriceVolumeCalculationContext.d.ts +4 -0
- package/dist/data/layers/createPriceVolumeDerivedLayerCalculationContext.d.ts +5 -0
- package/dist/data/layers/updateLayersData.d.ts +7 -0
- package/dist/data/map/buildDataMap.d.ts +9 -0
- package/dist/data/utils/deduceGranulairty.d.ts +4 -0
- package/dist/data/utils/granularityToTimeUnit.d.ts +4 -0
- package/dist/domain/constants/time/days.d.ts +8 -0
- package/dist/domain/constants/time/months.d.ts +8 -0
- package/dist/domain/constants/time/timeDurationsAsMs.d.ts +10 -0
- package/dist/domain/constants/timeZone/timeZones.d.ts +8 -0
- package/dist/domain/types/DataMap.d.ts +18 -0
- package/dist/domain/types/DataPoint.d.ts +14 -0
- package/dist/domain/types/DataPointInfo.d.ts +9 -0
- package/dist/domain/types/DateTimeFormatToken.d.ts +7 -0
- package/dist/domain/types/Granularity.d.ts +7 -0
- package/dist/domain/types/IndexBlock.d.ts +20 -0
- package/dist/domain/types/IndexProvider.d.ts +13 -0
- package/dist/domain/types/LayersData.d.ts +20 -0
- package/dist/domain/types/Layout.d.ts +19 -0
- package/dist/domain/types/LocalDateTime.d.ts +25 -0
- package/dist/domain/types/RawSession.d.ts +14 -0
- package/dist/domain/types/Theme.d.ts +17 -0
- package/dist/domain/types/TimeFormatToken.d.ts +7 -0
- package/dist/domain/types/TimeScale.d.ts +21 -0
- package/dist/domain/types/TimeUnit.d.ts +7 -0
- package/dist/domain/types/ViewportData.d.ts +18 -0
- package/dist/domain/types/gridLine/TimeGridLine.d.ts +7 -0
- package/dist/domain/types/gridLine/TimeGridStep.d.ts +14 -0
- package/dist/domain/types/gridLine/TimeIntervalSpec.d.ts +9 -0
- package/dist/domain/types/metrics/ChartMetrics.d.ts +5 -0
- package/dist/domain/types/metrics/LayerMetrics.d.ts +11 -0
- package/dist/domain/types/metrics/PanelMetrics.d.ts +15 -0
- package/dist/drawing/chart/borders/drawBorders.d.ts +4 -0
- package/dist/drawing/chart/crosshairs/clearChartCrosshairs.d.ts +8 -0
- package/dist/drawing/chart/crosshairs/drawChartCrosshairs.d.ts +13 -0
- package/dist/drawing/chart/crosshairs/drawChartValueCrosshairLabel.d.ts +5 -0
- package/dist/drawing/chart/drawChart.d.ts +9 -0
- package/dist/drawing/chart/grid/time/TimeGridLine.d.ts +11 -0
- package/dist/drawing/chart/grid/time/drawTimeGridLabels.d.ts +6 -0
- package/dist/drawing/chart/grid/time/drawTimeGridLines.d.ts +6 -0
- package/dist/drawing/chart/grid/time/isTimeGridLine.d.ts +3 -0
- package/dist/drawing/chart/grid/value/ValueGridLine.d.ts +10 -0
- package/dist/drawing/chart/grid/value/calculateValueGridLines.d.ts +3 -0
- package/dist/drawing/chart/grid/value/drawValueGridLines.d.ts +7 -0
- package/dist/drawing/chart/grid/value/getDefaultValueGridLines.d.ts +8 -0
- package/dist/drawing/elements/drawBar.d.ts +3 -0
- package/dist/drawing/elements/labels/timeLabel/drawTimeGridLabel.d.ts +4 -0
- package/dist/drawing/elements/labels/valueLabel/drawValueGridLabels.d.ts +9 -0
- package/dist/drawing/elements/line/drawLine.d.ts +8 -0
- package/dist/drawing/elements/line/endDrawLine.d.ts +3 -0
- package/dist/drawing/elements/line/startDrawLine.d.ts +3 -0
- package/dist/drawing/getCanvasContext.d.ts +12 -0
- package/dist/drawing/labels/valueLabel/drawValueGridLabels.d.ts +9 -0
- package/dist/drawing/layer/drawLayer.d.ts +10 -0
- package/dist/drawing/layer/drawLayers.d.ts +11 -0
- package/dist/drawing/panel/drawLayersForScale.d.ts +12 -0
- package/dist/drawing/panel/drawPanel.d.ts +14 -0
- package/dist/drawing/panel/drawPanelBorder.d.ts +9 -0
- package/dist/drawing/panel/drawPanels.d.ts +14 -0
- package/dist/drawing/panel/getPanelYAxes.d.ts +21 -0
- package/dist/drawing/panel/mapLayersByScale.d.ts +4 -0
- package/dist/drawing/valueMarker/drawDirectionalValueMarker.d.ts +12 -0
- package/dist/drawing/valueMarker/drawValueMarker.d.ts +12 -0
- package/dist/drawing/valueMarker/drawValueMarkerLabel.d.ts +13 -0
- package/dist/drawing/valueMarker/drawValueMarkerLine.d.ts +9 -0
- package/dist/exampleData/d1.d.ts +3 -0
- package/dist/exampleData/d1Short.d.ts +3 -0
- package/dist/exampleData/index.d.ts +7 -0
- package/dist/hooks/useDevicePixelRatio.d.ts +8 -0
- package/dist/hooks/useResizeObserver.d.ts +7 -0
- package/dist/index-Bb_QstiX.js +9443 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +21 -0
- package/dist/indexProviders/continuous/createContinuousIndexProvider.d.ts +5 -0
- package/dist/indexProviders/continuous/findClosestIndex.d.ts +3 -0
- package/dist/indexProviders/continuous/getKnownBars.d.ts +6 -0
- package/dist/indexProviders/continuous/indexToTimestamp.d.ts +3 -0
- package/dist/indexProviders/continuous/lowerBound.d.ts +8 -0
- package/dist/indexProviders/continuous/timestampToBarIndex.d.ts +3 -0
- package/dist/layers/atr/ATRLayer.d.ts +8 -0
- package/dist/layers/atr/AtrLayerConfig.d.ts +44 -0
- package/dist/layers/atr/calc.d.ts +4 -0
- package/dist/layers/atr/draw.d.ts +10 -0
- package/dist/layers/atr/index.d.ts +5 -0
- package/dist/layers/atr/parse.d.ts +4 -0
- package/dist/layers/bollingerBands/BollingerBandsLayer.d.ts +8 -0
- package/dist/layers/bollingerBands/BollingerBandsLayerConfig.d.ts +65 -0
- package/dist/layers/bollingerBands/calc.d.ts +4 -0
- package/dist/layers/bollingerBands/draw.d.ts +10 -0
- package/dist/layers/bollingerBands/index.d.ts +5 -0
- package/dist/layers/bollingerBands/parse.d.ts +4 -0
- package/dist/layers/candlesticks/CandlestickLayerConfig.d.ts +42 -0
- package/dist/layers/candlesticks/CandlesticksLayer.d.ts +8 -0
- package/dist/layers/candlesticks/calc.d.ts +5 -0
- package/dist/layers/candlesticks/draw/_debugDrawEmptyCandle.d.ts +8 -0
- package/dist/layers/candlesticks/draw/draw.d.ts +10 -0
- package/dist/layers/candlesticks/draw/drawCandleBody.d.ts +3 -0
- package/dist/layers/candlesticks/draw/drawCandleWick.d.ts +3 -0
- package/dist/layers/candlesticks/draw/drawCandlestick.d.ts +4 -0
- package/dist/layers/candlesticks/index.d.ts +5 -0
- package/dist/layers/candlesticks/parse.d.ts +4 -0
- package/dist/layers/ema/EMALayer.d.ts +8 -0
- package/dist/layers/ema/EmaLayerConfig.d.ts +42 -0
- package/dist/layers/ema/calc.d.ts +4 -0
- package/dist/layers/ema/draw.d.ts +10 -0
- package/dist/layers/ema/index.d.ts +5 -0
- package/dist/layers/ema/parse.d.ts +4 -0
- package/dist/layers/index.d.ts +11 -0
- package/dist/layers/layers.d.ts +4 -0
- package/dist/layers/macd/MACDLayer.d.ts +8 -0
- package/dist/layers/macd/MacdLayerConfig.d.ts +61 -0
- package/dist/layers/macd/calc.d.ts +4 -0
- package/dist/layers/macd/draw.d.ts +10 -0
- package/dist/layers/macd/index.d.ts +5 -0
- package/dist/layers/macd/parse.d.ts +4 -0
- package/dist/layers/priceLine/PriceLineLayer.d.ts +8 -0
- package/dist/layers/priceLine/PriceLineLayerConfig.d.ts +39 -0
- package/dist/layers/priceLine/calc.d.ts +5 -0
- package/dist/layers/priceLine/draw.d.ts +10 -0
- package/dist/layers/priceLine/index.d.ts +5 -0
- package/dist/layers/priceLine/parse.d.ts +4 -0
- package/dist/layers/rsi/RSILayer.d.ts +8 -0
- package/dist/layers/rsi/RsiLayerConfig.d.ts +40 -0
- package/dist/layers/rsi/calc.d.ts +4 -0
- package/dist/layers/rsi/draw.d.ts +10 -0
- package/dist/layers/rsi/index.d.ts +5 -0
- package/dist/layers/rsi/parse.d.ts +4 -0
- package/dist/layers/sma/SMALayer.d.ts +8 -0
- package/dist/layers/sma/SmaLayerConfig.d.ts +42 -0
- package/dist/layers/sma/calc.d.ts +4 -0
- package/dist/layers/sma/draw.d.ts +10 -0
- package/dist/layers/sma/index.d.ts +5 -0
- package/dist/layers/sma/parse.d.ts +4 -0
- package/dist/layers/stochastic/StochasticLayer.d.ts +8 -0
- package/dist/layers/stochastic/StochasticLayerConfig.d.ts +56 -0
- package/dist/layers/stochastic/calc.d.ts +4 -0
- package/dist/layers/stochastic/draw.d.ts +10 -0
- package/dist/layers/stochastic/index.d.ts +5 -0
- package/dist/layers/stochastic/parse.d.ts +4 -0
- package/dist/layers/volumeBars/VolumeBarsLayer.d.ts +8 -0
- package/dist/layers/volumeBars/VolumeBarsLayerConfig.d.ts +38 -0
- package/dist/layers/volumeBars/calc.d.ts +5 -0
- package/dist/layers/volumeBars/draw/draw.d.ts +10 -0
- package/dist/layers/volumeBars/draw/drawVolumeBar.d.ts +3 -0
- package/dist/layers/volumeBars/index.d.ts +5 -0
- package/dist/layers/volumeBars/parse.d.ts +4 -0
- package/dist/layout/getLayout.d.ts +5 -0
- package/dist/metrics/chart/calculateChartMetrics.d.ts +5 -0
- package/dist/metrics/layer/calculateLayerMetrics.d.ts +8 -0
- package/dist/metrics/layer/getIndicatorScalingValues.d.ts +3 -0
- package/dist/metrics/layer/getMinAndMaxValues.d.ts +8 -0
- package/dist/propTypes.d.ts +15 -0
- package/dist/propTypes.js +77 -0
- package/dist/react-candlesticks.css +6 -0
- package/dist/themes/defaultDarkTheme.d.ts +3 -0
- package/dist/themes/defaultLightTheme.d.ts +3 -0
- package/dist/themes/themes.d.ts +4 -0
- package/dist/timeScale/continuous/continuousTimeScale.d.ts +5 -0
- package/dist/timeScale/core/calculateNewScrollOffset.d.ts +3 -0
- package/dist/timeScale/core/createTimeScale.d.ts +15 -0
- package/dist/timeScale/gridLines/generateTimeGridLines.d.ts +5 -0
- package/dist/timeScale/gridLines/getTimeGridStep.d.ts +5 -0
- package/dist/timeScale/gridLines/isTimeGridLine.d.ts +7 -0
- package/dist/utils/createSelector.d.ts +8 -0
- package/dist/utils/throttle.d.ts +8 -0
- package/dist/utils/time/isoTimestampToMs.d.ts +8 -0
- package/dist/utils/time/localToUtc.d.ts +14 -0
- package/dist/utils/time/utcToLocal.d.ts +3 -0
- package/package.json +117 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { LineConfig, LineConfigComplete } from '../../config/elements/line/LineConfig';
|
|
2
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
3
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
4
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
5
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
6
|
+
type RequiredInputKeys = ['input'];
|
|
7
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
8
|
+
export interface PriceLineLayerConfigComplete extends BaseLayerConfigComplete {
|
|
9
|
+
type: 'price:line';
|
|
10
|
+
requiredInputKeys: RequiredInputKeys;
|
|
11
|
+
offset: 0;
|
|
12
|
+
series: {
|
|
13
|
+
value: null | LineConfigComplete;
|
|
14
|
+
};
|
|
15
|
+
markers: {
|
|
16
|
+
value: null | ValueMarkerConfigComplete;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface PriceLineLayerConfig extends BaseLayerConfig {
|
|
20
|
+
type: 'price:line';
|
|
21
|
+
series?: {
|
|
22
|
+
value?: false | LineConfig;
|
|
23
|
+
};
|
|
24
|
+
markers?: {
|
|
25
|
+
value?: false | ValueMarkerConfig;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
export interface PriceLineTheme {
|
|
29
|
+
series: {
|
|
30
|
+
value: LineConfigComplete;
|
|
31
|
+
};
|
|
32
|
+
markers: {
|
|
33
|
+
value: ValueMarkerTheme;
|
|
34
|
+
};
|
|
35
|
+
legend: LegendTheme;
|
|
36
|
+
yAxis: YAxisTheme;
|
|
37
|
+
}
|
|
38
|
+
export declare const priceLineLayerDefaults: Omit<PriceLineLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'period' | 'markers' | 'legend' | 'yAxis'>;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
endBarIndex: number) => void;
|
|
5
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../config/chart/ChartConfig';
|
|
2
|
+
import { Layout } from '../../domain/types/Layout';
|
|
3
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
4
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
5
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
6
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
7
|
+
import { default as ViewportData } from '../../domain/types/ViewportData';
|
|
8
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics | null, layerMetrics: LayerMetrics | null) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as Layer } from '../../config/layer/Layer';
|
|
2
|
+
import { PriceLineLayerConfig, PriceLineLayerConfigComplete } from './PriceLineLayerConfig';
|
|
3
|
+
export type { PriceLineLayerConfig, PriceLineLayerConfigComplete, };
|
|
4
|
+
declare const priceLine: Layer;
|
|
5
|
+
export default priceLine;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PriceLineLayerConfig, PriceLineLayerConfigComplete } from './PriceLineLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: PriceLineLayerConfig, layersTheme: LayersTheme, panelId: string) => PriceLineLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { LineConfig, LineConfigComplete } from '../../config/elements/line/LineConfig';
|
|
3
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
4
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
5
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
6
|
+
import { LayerInputField } from '../../config/layer/inputSourceShorthand';
|
|
7
|
+
type RequiredInputKeys = ['input'];
|
|
8
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
9
|
+
export interface RsiLayerConfigComplete extends BaseLayerConfigComplete {
|
|
10
|
+
type: 'rsi';
|
|
11
|
+
requiredInputKeys: RequiredInputKeys;
|
|
12
|
+
series: {
|
|
13
|
+
value: null | LineConfigComplete;
|
|
14
|
+
};
|
|
15
|
+
markers: {
|
|
16
|
+
value: null | ValueMarkerConfigComplete;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export interface RsiLayerConfig extends BaseLayerConfig {
|
|
20
|
+
type: 'rsi';
|
|
21
|
+
source?: LayerInputField;
|
|
22
|
+
series?: {
|
|
23
|
+
value?: false | LineConfig;
|
|
24
|
+
};
|
|
25
|
+
markers?: {
|
|
26
|
+
value?: false | ValueMarkerConfig;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface RsiTheme {
|
|
30
|
+
series: {
|
|
31
|
+
value: LineConfigComplete;
|
|
32
|
+
};
|
|
33
|
+
markers: {
|
|
34
|
+
value: ValueMarkerTheme;
|
|
35
|
+
};
|
|
36
|
+
legend: LegendTheme;
|
|
37
|
+
yAxis: YAxisTheme;
|
|
38
|
+
}
|
|
39
|
+
export declare const rsiDefaults: Omit<RsiLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'markers' | 'legend' | 'yAxis'>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, endBarIndex: number) => void;
|
|
4
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../config/chart/ChartConfig';
|
|
2
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
3
|
+
import { Layout } from '../../domain/types/Layout';
|
|
4
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
5
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
6
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
7
|
+
import { default as ViewportData } from '../../domain/types/ViewportData';
|
|
8
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics | null, layerMetrics: LayerMetrics | null) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { RsiLayerConfigComplete, RsiLayerConfig } from './RsiLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: RsiLayerConfig, layersTheme: LayersTheme, panelId: string) => RsiLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LineConfig, LineConfigComplete } from '../../config/elements/line/LineConfig';
|
|
2
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
3
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
4
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
5
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
6
|
+
import { LayerInputField } from '../../config/layer/inputSourceShorthand';
|
|
7
|
+
type RequiredInputKeys = ['input'];
|
|
8
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
9
|
+
export interface SmaLayerConfigComplete extends BaseLayerConfigComplete {
|
|
10
|
+
type: 'sma';
|
|
11
|
+
requiredInputKeys: RequiredInputKeys;
|
|
12
|
+
offset: number;
|
|
13
|
+
series: {
|
|
14
|
+
value: null | LineConfigComplete;
|
|
15
|
+
};
|
|
16
|
+
markers: {
|
|
17
|
+
value: null | ValueMarkerConfigComplete;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export interface SmaLayerConfig extends BaseLayerConfig {
|
|
21
|
+
type: 'sma';
|
|
22
|
+
source?: LayerInputField;
|
|
23
|
+
offset?: number;
|
|
24
|
+
series?: {
|
|
25
|
+
value?: false | LineConfig;
|
|
26
|
+
};
|
|
27
|
+
markers?: {
|
|
28
|
+
value?: false | ValueMarkerConfig;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
export interface SmaTheme {
|
|
32
|
+
series: {
|
|
33
|
+
value: LineConfigComplete;
|
|
34
|
+
};
|
|
35
|
+
markers: {
|
|
36
|
+
value: ValueMarkerTheme;
|
|
37
|
+
};
|
|
38
|
+
legend: LegendTheme;
|
|
39
|
+
yAxis: YAxisTheme;
|
|
40
|
+
}
|
|
41
|
+
export declare const smaDefaults: Omit<SmaLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'requiredInputKeys' | 'markers' | 'legend' | 'yAxis'>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, endBarIndex: number) => void;
|
|
4
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../config/chart/ChartConfig';
|
|
2
|
+
import { Layout } from '../../domain/types/Layout';
|
|
3
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
4
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
5
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
6
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
7
|
+
import { default as ViewportData } from '../../domain/types/ViewportData';
|
|
8
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics, layerMetrics: LayerMetrics) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { SmaLayerConfig, SmaLayerConfigComplete } from './SmaLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: SmaLayerConfig, layersTheme: LayersTheme, panelId: string) => SmaLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { StochasticLayerConfig } from './StochasticLayerConfig';
|
|
2
|
+
export interface StochasticLayerProps extends Omit<StochasticLayerConfig, 'type'> {
|
|
3
|
+
}
|
|
4
|
+
declare const StochasticLayer: {
|
|
5
|
+
(_props: StochasticLayerProps): null;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export default StochasticLayer;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { LineConfig, LineConfigComplete, LineTheme } from '../../config/elements/line/LineConfig';
|
|
3
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
4
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
5
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
6
|
+
import { LayerInputField } from '../../config/layer/inputSourceShorthand';
|
|
7
|
+
type RequiredInputKeys = ['high', 'low', 'close'];
|
|
8
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
9
|
+
export interface StochasticLayerConfigComplete extends BaseLayerConfigComplete {
|
|
10
|
+
type: 'stochastic';
|
|
11
|
+
requiredInputKeys: RequiredInputKeys;
|
|
12
|
+
kPeriod: number;
|
|
13
|
+
kSmoothing: number;
|
|
14
|
+
dPeriod: number;
|
|
15
|
+
series: {
|
|
16
|
+
k: null | LineConfigComplete;
|
|
17
|
+
d: null | LineConfigComplete;
|
|
18
|
+
};
|
|
19
|
+
markers: {
|
|
20
|
+
k: null | ValueMarkerConfigComplete;
|
|
21
|
+
d: null | ValueMarkerConfigComplete;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface StochasticLayerConfig extends BaseLayerConfig {
|
|
25
|
+
type: 'stochastic';
|
|
26
|
+
source?: {
|
|
27
|
+
high?: LayerInputField;
|
|
28
|
+
low?: LayerInputField;
|
|
29
|
+
close?: LayerInputField;
|
|
30
|
+
};
|
|
31
|
+
kPeriod?: number;
|
|
32
|
+
kSmoothing?: number;
|
|
33
|
+
dPeriod?: number;
|
|
34
|
+
series?: {
|
|
35
|
+
k?: false | LineConfig;
|
|
36
|
+
d?: false | LineConfig;
|
|
37
|
+
};
|
|
38
|
+
markers?: {
|
|
39
|
+
k?: false | ValueMarkerConfig;
|
|
40
|
+
d?: false | ValueMarkerConfig;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export interface StochasticTheme {
|
|
44
|
+
series: {
|
|
45
|
+
k: LineTheme;
|
|
46
|
+
d: LineTheme;
|
|
47
|
+
};
|
|
48
|
+
markers: {
|
|
49
|
+
k: ValueMarkerTheme;
|
|
50
|
+
d: ValueMarkerTheme;
|
|
51
|
+
};
|
|
52
|
+
legend: LegendTheme;
|
|
53
|
+
yAxis: YAxisTheme;
|
|
54
|
+
}
|
|
55
|
+
export declare const stochasticDefaults: Omit<StochasticLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'series' | 'markers' | 'legend' | 'yAxis'>;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, endBarIndex: number) => void;
|
|
4
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../config/chart/ChartConfig';
|
|
2
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
3
|
+
import { Layout } from '../../domain/types/Layout';
|
|
4
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
5
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
6
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
7
|
+
import { default as ViewportData } from '../../domain/types/ViewportData';
|
|
8
|
+
import { BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: BaseLayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics | null, layerMetrics: LayerMetrics | null) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as Layer } from '../../config/layer/Layer';
|
|
2
|
+
import { StochasticLayerConfig, StochasticLayerConfigComplete } from './StochasticLayerConfig';
|
|
3
|
+
export type { StochasticLayerConfig, StochasticLayerConfigComplete, };
|
|
4
|
+
declare const stochastic: Layer;
|
|
5
|
+
export default stochastic;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { StochasticLayerConfigComplete, StochasticLayerConfig } from './StochasticLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: StochasticLayerConfig, layersTheme: LayersTheme, panelId: string) => StochasticLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { VolumeBarsLayerConfig } from './VolumeBarsLayerConfig';
|
|
2
|
+
export interface VolumeBarsProps extends Omit<VolumeBarsLayerConfig, 'type'> {
|
|
3
|
+
}
|
|
4
|
+
declare const VolumeBarsLayer: {
|
|
5
|
+
(_props: VolumeBarsProps): null;
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
8
|
+
export default VolumeBarsLayer;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ValueMarkerConfig, ValueMarkerConfigComplete, ValueMarkerTheme } from '../../config/valueMarker/ValueMarkerConfig';
|
|
2
|
+
import { DirectionalBarConfig, DirectionalBarConfigComplete } from '../../config/elements/bar/DirectionalBarConfig';
|
|
3
|
+
import { LegendTheme } from '../../config/legend/LegendConfig';
|
|
4
|
+
import { BaseLayerConfig, BaseLayerConfigComplete } from '../../config/layer/BaseLayerConfig';
|
|
5
|
+
import { YAxisTheme } from '../../config/layer/yAxis/YAxisConfig';
|
|
6
|
+
type RequiredInputKeys = ['volume'];
|
|
7
|
+
export declare const REQUIRED_INPUT_KEYS: RequiredInputKeys;
|
|
8
|
+
export interface VolumeBarsLayerConfigComplete extends BaseLayerConfigComplete {
|
|
9
|
+
type: 'volume:bars';
|
|
10
|
+
requiredInputKeys: RequiredInputKeys;
|
|
11
|
+
series: {
|
|
12
|
+
bars: null | DirectionalBarConfigComplete;
|
|
13
|
+
};
|
|
14
|
+
markers: {
|
|
15
|
+
value: null | ValueMarkerConfigComplete;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface VolumeBarsLayerConfig extends BaseLayerConfig {
|
|
19
|
+
type: 'volume:bars';
|
|
20
|
+
series?: {
|
|
21
|
+
bars?: false | DirectionalBarConfig;
|
|
22
|
+
};
|
|
23
|
+
markers?: {
|
|
24
|
+
value?: false | ValueMarkerConfig;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
export interface VolumeBarsTheme {
|
|
28
|
+
series: {
|
|
29
|
+
bars: DirectionalBarConfigComplete;
|
|
30
|
+
};
|
|
31
|
+
markers: {
|
|
32
|
+
value: ValueMarkerTheme;
|
|
33
|
+
};
|
|
34
|
+
legend: LegendTheme;
|
|
35
|
+
yAxis: YAxisTheme;
|
|
36
|
+
}
|
|
37
|
+
export declare const volumeBarsDefaults: Omit<VolumeBarsLayerConfigComplete, 'type' | 'scale' | 'scalePolicy' | 'requiredInputKeys' | 'period' | 'markers' | 'legend' | 'yAxis'>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
2
|
+
import { LayerInputSeries } from '../../domain/types/LayersData';
|
|
3
|
+
declare const calc: (layerConfig: LayerConfigComplete, inputs: Record<string, LayerInputSeries>, outputValues: Record<string, Float64Array>, startBarIndex: number, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
4
|
+
endBarIndex: number) => void;
|
|
5
|
+
export default calc;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../../../config/chart/ChartConfig';
|
|
2
|
+
import { PanelConfigComplete } from '../../../config/panel/PanelConfig';
|
|
3
|
+
import { Layout } from '../../../domain/types/Layout';
|
|
4
|
+
import { ChartMetrics } from '../../../domain/types/metrics/ChartMetrics';
|
|
5
|
+
import { PanelMetrics } from '../../../domain/types/metrics/PanelMetrics';
|
|
6
|
+
import { LayerMetrics } from '../../../domain/types/metrics/LayerMetrics';
|
|
7
|
+
import { LayerConfigComplete } from '../../../config/layer/LayerConfig';
|
|
8
|
+
import { default as ViewportData } from '../../../domain/types/ViewportData';
|
|
9
|
+
declare const draw: (context: CanvasRenderingContext2D, axesContext: CanvasRenderingContext2D, chartConfig: ChartConfigComplete, panelConfig: PanelConfigComplete, layerConfig: LayerConfigComplete, layout: Layout, viewportData: ViewportData, chartMetrics: ChartMetrics | null, panelMetrics: PanelMetrics | null, layerMetrics: LayerMetrics | null) => void;
|
|
10
|
+
export default draw;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { VolumeBarsLayerConfigComplete } from '../VolumeBarsLayerConfig';
|
|
2
|
+
declare const drawVolumeBar: (context: CanvasRenderingContext2D, volumeBarsLayerConfig: VolumeBarsLayerConfigComplete, variantKey: "up" | "down" | "flat", x: number, barTop: number, barBottom: number, intervalWidthPx: number) => void;
|
|
3
|
+
export default drawVolumeBar;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as Layer } from '../../config/layer/Layer';
|
|
2
|
+
import { VolumeBarsLayerConfig, VolumeBarsLayerConfigComplete } from './VolumeBarsLayerConfig';
|
|
3
|
+
export type { VolumeBarsLayerConfig, VolumeBarsLayerConfigComplete, };
|
|
4
|
+
declare const volumeBars: Layer;
|
|
5
|
+
export default volumeBars;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { VolumeBarsLayerConfig, VolumeBarsLayerConfigComplete } from './VolumeBarsLayerConfig';
|
|
2
|
+
import { LayersTheme } from '../../config/layer/LayerConfig';
|
|
3
|
+
declare const parse: (partialConfig: VolumeBarsLayerConfig, layersTheme: LayersTheme, panelId: string) => VolumeBarsLayerConfigComplete;
|
|
4
|
+
export default parse;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ChartConfigComplete } from '../config/chart/ChartConfig';
|
|
2
|
+
import { PanelConfigComplete } from '../config/panel/PanelConfig';
|
|
3
|
+
import { Layout } from '../domain/types/Layout';
|
|
4
|
+
declare const getLayout: (chartWidth: number, chartHeight: number, dpr: number, chartConfig: ChartConfigComplete, panelConfigs: PanelConfigComplete[]) => Layout;
|
|
5
|
+
export default getLayout;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Layout } from '../../domain/types/Layout';
|
|
2
|
+
import { ChartMetrics } from '../../domain/types/metrics/ChartMetrics';
|
|
3
|
+
import { PanelConfigComplete } from '../../config/panel/PanelConfig';
|
|
4
|
+
declare const calculateChartMetrics: (panels: PanelConfigComplete[], layout: Layout) => ChartMetrics | null;
|
|
5
|
+
export default calculateChartMetrics;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LayerScale } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { LayerConfigComplete } from '../../config/layer/LayerConfig';
|
|
3
|
+
import { LayersData } from '../../domain/types/LayersData';
|
|
4
|
+
import { DataMap } from '../../domain/types/DataMap';
|
|
5
|
+
import { PanelMetrics } from '../../domain/types/metrics/PanelMetrics';
|
|
6
|
+
import { LayerMetrics } from '../../domain/types/metrics/LayerMetrics';
|
|
7
|
+
declare const calculateLayerMetrics: (dataMap: DataMap, layerData: LayersData, startBarIndex: number, endBarIndex: number, layerConfigs: LayerConfigComplete[], layerConfig0: LayerConfigComplete, panelMetrics: PanelMetrics, scale: LayerScale) => LayerMetrics | null;
|
|
8
|
+
export default calculateLayerMetrics;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LayerScale } from '../../config/layer/BaseLayerConfig';
|
|
2
|
+
import { LayerDataInstance } from '../../domain/types/LayersData';
|
|
3
|
+
import { OHLCVData } from '../../domain/types/DataMap';
|
|
4
|
+
declare const getMinAndMaxValues: (ohlcvs: OHLCVData, layerDataInstances: LayerDataInstance[], scale: LayerScale, startBarIndex: number, endBarIndex: number) => {
|
|
5
|
+
min: number;
|
|
6
|
+
max: number;
|
|
7
|
+
};
|
|
8
|
+
export default getMinAndMaxValues;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* react-candlesticks, trendingcandles.com
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 Jason Wilson
|
|
5
|
+
* Licensed under the MIT License (see LICENSE file in the project root).
|
|
6
|
+
*/
|
|
7
|
+
export { default as Chart } from './components/Chart/ChartWithPropTypes';
|
|
8
|
+
export type { ChartProps } from './components/Chart/Chart';
|
|
9
|
+
export { default as chartPropTypes } from './components/Chart/chartPropTypes';
|
|
10
|
+
export * from './config';
|
|
11
|
+
export * from './layers';
|
|
12
|
+
export * from './domain/types/DataPoint';
|
|
13
|
+
export * from './exampleData';
|
|
14
|
+
export type { Theme } from './domain/types/Theme';
|
|
15
|
+
export type { ThemeName } from './themes/themes';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Jason Wilson, trendingcandles.com
|
|
3
|
+
* Licensed under the MIT License
|
|
4
|
+
* Build time: 2026-05-10T11:51:19.652Z
|
|
5
|
+
*/
|
|
6
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
7
|
+
import { memo as m } from "react";
|
|
8
|
+
import { t as y, a as b } from "./index-Bb_QstiX.js";
|
|
9
|
+
import { A as w, B as M, C as S, E as V, M as q, P as B, b as W, R as $, S as k, c as N, V as D, e as L } from "./index-Bb_QstiX.js";
|
|
10
|
+
import e from "prop-types";
|
|
11
|
+
const P = Object.keys(y), d = (...r) => (o, a, t, n, s, i) => {
|
|
12
|
+
for (const l of r) {
|
|
13
|
+
const c = l(o, a, t, n, s, i);
|
|
14
|
+
if (c)
|
|
15
|
+
return c;
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}, h = (r, o, a) => {
|
|
19
|
+
const t = r.panels !== void 0, n = r.children !== void 0;
|
|
20
|
+
return t && n ? new Error(
|
|
21
|
+
`${a} cannot accept both \`panels\` and \`children\`. Provide one or the other.`
|
|
22
|
+
) : !t && !n ? new Error(
|
|
23
|
+
`${a} requires either \`panels\` or \`children\` to define at least one panel.`
|
|
24
|
+
) : null;
|
|
25
|
+
}, g = (r, o, a) => {
|
|
26
|
+
const t = r[o];
|
|
27
|
+
return Array.isArray(t) && t.length === 0 ? new Error(`${a} expects \`${o}\` to contain at least one panel.`) : null;
|
|
28
|
+
}, p = (r) => (o, a, t, n, s, i) => e.oneOfType([
|
|
29
|
+
e.number,
|
|
30
|
+
e.oneOf(["auto"])
|
|
31
|
+
])(o, r, t, n, s, i), v = e.arrayOf(e.object.isRequired), T = e.node, C = {
|
|
32
|
+
width: p("width"),
|
|
33
|
+
height: p("height"),
|
|
34
|
+
intervalWidthPx: e.number,
|
|
35
|
+
granularity: e.string,
|
|
36
|
+
backgroundColor: e.string,
|
|
37
|
+
xAxis: e.oneOfType([e.bool, e.object]),
|
|
38
|
+
grid: e.oneOfType([e.bool, e.object]),
|
|
39
|
+
crosshairs: e.oneOfType([e.bool, e.object]),
|
|
40
|
+
theme: e.oneOfType([
|
|
41
|
+
e.oneOf(P),
|
|
42
|
+
e.object
|
|
43
|
+
]),
|
|
44
|
+
data: e.arrayOf(e.object.isRequired).isRequired,
|
|
45
|
+
scrollToLatestMargin: e.number,
|
|
46
|
+
onScroll: e.func,
|
|
47
|
+
onZoom: e.func,
|
|
48
|
+
panels: d(
|
|
49
|
+
(r, o, a, t, n, s) => v(r, o, a, t, n, s),
|
|
50
|
+
h,
|
|
51
|
+
g
|
|
52
|
+
),
|
|
53
|
+
children: d(
|
|
54
|
+
(r, o, a, t, n, s) => T(r, o, a, t, n, s),
|
|
55
|
+
h
|
|
56
|
+
)
|
|
57
|
+
}, u = m(function(o) {
|
|
58
|
+
return /* @__PURE__ */ f(b, { ...o });
|
|
59
|
+
});
|
|
60
|
+
u.displayName = "Chart";
|
|
61
|
+
u.propTypes = C;
|
|
62
|
+
export {
|
|
63
|
+
w as ATR,
|
|
64
|
+
M as BollingerBands,
|
|
65
|
+
S as Candlesticks,
|
|
66
|
+
u as Chart,
|
|
67
|
+
V as EMA,
|
|
68
|
+
q as MACD,
|
|
69
|
+
B as Panel,
|
|
70
|
+
W as PriceLine,
|
|
71
|
+
$ as RSI,
|
|
72
|
+
k as SMA,
|
|
73
|
+
N as Stochastic,
|
|
74
|
+
D as VolumeBars,
|
|
75
|
+
C as chartPropTypes,
|
|
76
|
+
L as exampleData
|
|
77
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026 Jason Wilson, trendingcandles.com
|
|
3
|
+
* Licensed under the MIT License
|
|
4
|
+
* Build time: 2026-05-10T11:51:19.652Z
|
|
5
|
+
*/
|
|
6
|
+
@charset "UTF-8";._interactiveArea_1ela9_8{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;cursor:crosshair;touch-action:none;overscroll-behavior-x:contain}._canvases_u908y_8{position:relative;width:100%;height:100%}._drawingCanvas_u908y_14{position:absolute;top:0}._axesCanvas_u908y_19,._crosshairsCanvas_u908y_25{position:absolute;left:0;top:0}._uis_1h7fp_8{position:absolute}._legend_xya6s_8{width:fit-content;margin:0 0 4px;box-sizing:border-box;white-space:nowrap}._legendLabel_xya6s_15{margin-right:12px}._fieldLabel_xya6s_19{margin-right:2px}._fieldValue_xya6s_23{margin-right:6px}._panelUis_b5fyk_8{position:absolute;padding-top:4px;width:100%;box-sizing:border-box}._goToLatestButton_18vcz_8{position:absolute;padding:4px 12px;height:40px;z-index:20}._statefulChart_aenp7_8{position:relative;width:100%;height:100%}._chart_kyo5w_8{font-family:Arial,Helvetica,sans-serif;font-size:13px}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataMap } from '../../domain/types/DataMap';
|
|
2
|
+
import { Granularity } from '../../domain/types/Granularity';
|
|
3
|
+
import { TimeScale } from '../../domain/types/TimeScale';
|
|
4
|
+
declare const continuousTimeScale: (dataMap: DataMap, granularity: Granularity, intervalSize: number, scrollOffset: number, viewportWidth: number) => TimeScale;
|
|
5
|
+
export default continuousTimeScale;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { IndexProvider } from '../../domain/types/IndexProvider';
|
|
2
|
+
declare function calculateNewScrollOffset(currentScrollOffset: number, deltaX: number, indexToTimestamp: IndexProvider['indexToTimestamp'], findClosestIndex: IndexProvider['findClosestIndex'], intervalSize: number, viewportWidth: number, previousIntervalSize?: number, isGranularityChange?: boolean, minScrollOffset?: number, maxScrollOffset?: number): number;
|
|
3
|
+
export default calculateNewScrollOffset;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DataMap } from '../../domain/types/DataMap';
|
|
2
|
+
import { Granularity } from '../../domain/types/Granularity';
|
|
3
|
+
import { TimeScale } from '../../domain/types/TimeScale';
|
|
4
|
+
interface CreateTimeScaleParams {
|
|
5
|
+
dataMap: DataMap;
|
|
6
|
+
granularity: Granularity;
|
|
7
|
+
intervalSize: number;
|
|
8
|
+
scrollOffset: number;
|
|
9
|
+
viewportWidth: number;
|
|
10
|
+
timeZoneId: string;
|
|
11
|
+
timestampToIndex: (timestamp: number, nearest?: boolean) => number | undefined;
|
|
12
|
+
sessionsAndBlocks?: unknown;
|
|
13
|
+
}
|
|
14
|
+
declare const createTimeScale: ({ dataMap, granularity, intervalSize, scrollOffset, viewportWidth, timeZoneId, timestampToIndex, sessionsAndBlocks, }: CreateTimeScaleParams) => TimeScale;
|
|
15
|
+
export default createTimeScale;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TimeGridLine } from '../../domain/types/gridLine/TimeGridLine';
|
|
2
|
+
import { TimeGridStep } from '../../domain/types/gridLine/TimeGridStep';
|
|
3
|
+
import { DataMap } from '../../domain/types/DataMap';
|
|
4
|
+
declare function generateTimeGridLines(dataMap: DataMap, startBarIndex: number, endBarIndex: number, step: TimeGridStep, intervalSize: number, scrollOffset: number, viewportWidth: number, timeZoneId: string): TimeGridLine[];
|
|
5
|
+
export default generateTimeGridLines;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Granularity } from '../../domain/types/Granularity';
|
|
2
|
+
import { TimeGridStep } from '../../domain/types/gridLine/TimeGridStep';
|
|
3
|
+
export declare const MIN_TIME_LINE_SPACING = 80;
|
|
4
|
+
declare const getTimeGridStep: (intervalSize: number, granularity: Granularity) => TimeGridStep;
|
|
5
|
+
export default getTimeGridStep;
|