@quantlife/qlchart 0.0.1
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/.idea/QLChart.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/README.md +75 -0
- package/demo/App.css +213 -0
- package/demo/App.tsx +46 -0
- package/demo/components/ControlPanel.tsx +13 -0
- package/demo/components/DemoNav.tsx +27 -0
- package/demo/index.html +16 -0
- package/demo/main.tsx +10 -0
- package/demo/pages/BasicChartDemo.tsx +61 -0
- package/demo/pages/DrawingDemo.tsx +22 -0
- package/demo/pages/IndicatorDemo.tsx +22 -0
- package/demo/pages/LayoutDemo.tsx +35 -0
- package/demo/pages/MultiPeriodDemo.tsx +31 -0
- package/demo/pages/ReplayDemo.tsx +195 -0
- package/demo/pages/SaveDemo.tsx +27 -0
- package/demo/pages/ThemeDemo.tsx +29 -0
- package/demo/standalone-demo.html +597 -0
- package/demo/vite.config.demo.ts +17 -0
- package/dist/index.d.ts +1973 -0
- package/dist/qlchart.js +23169 -0
- package/dist/style.css +1 -0
- package/doc/api/indicator-data-processor.md +35 -0
- package/doc/api-reference/.nojekyll +1 -0
- package/doc/api-reference/assets/hierarchy.js +1 -0
- package/doc/api-reference/assets/highlight.css +43 -0
- package/doc/api-reference/assets/icons.js +18 -0
- package/doc/api-reference/assets/icons.svg +1 -0
- package/doc/api-reference/assets/main.js +60 -0
- package/doc/api-reference/assets/navigation.js +1 -0
- package/doc/api-reference/assets/search.js +1 -0
- package/doc/api-reference/assets/style.css +1611 -0
- package/doc/api-reference/classes/ChartManager.html +16 -0
- package/doc/api-reference/classes/DataManager.html +13 -0
- package/doc/api-reference/classes/DrawingAdapter.html +64 -0
- package/doc/api-reference/classes/DrawingPersistence.html +21 -0
- package/doc/api-reference/classes/EventManager.html +12 -0
- package/doc/api-reference/classes/HollowCandlestickSeries.html +22 -0
- package/doc/api-reference/classes/IndicatorRenderer.html +20 -0
- package/doc/api-reference/classes/KlineReplay.html +31 -0
- package/doc/api-reference/classes/MockDataService.html +13 -0
- package/doc/api-reference/classes/MockIndicatorService.html +4 -0
- package/doc/api-reference/classes/OverlayIndicator.html +11 -0
- package/doc/api-reference/classes/PaneIndicator.html +16 -0
- package/doc/api-reference/classes/PaneManager.html +24 -0
- package/doc/api-reference/classes/RealtimeDataFeed.html +22 -0
- package/doc/api-reference/classes/RenkoSeries.html +22 -0
- package/doc/api-reference/classes/ScreenshotUtil.html +10 -0
- package/doc/api-reference/classes/SeriesManager.html +30 -0
- package/doc/api-reference/classes/ThemeManager.html +18 -0
- package/doc/api-reference/enums/ChartEvent.html +12 -0
- package/doc/api-reference/enums/IndicatorType.html +4 -0
- package/doc/api-reference/enums/SeriesType.html +13 -0
- package/doc/api-reference/functions/ChartFunctionMenu.html +1 -0
- package/doc/api-reference/functions/DrawingModule.html +8 -0
- package/doc/api-reference/functions/IndicatorPanel.html +2 -0
- package/doc/api-reference/functions/IndicatorTag.html +2 -0
- package/doc/api-reference/functions/KlineTypeSelector.html +1 -0
- package/doc/api-reference/functions/LayoutSwitcher.html +1 -0
- package/doc/api-reference/functions/PeriodSelector.html +1 -0
- package/doc/api-reference/functions/QLChartLayout.html +1 -0
- package/doc/api-reference/functions/QLChartPanel.html +10 -0
- package/doc/api-reference/functions/QLChartProvider.html +2 -0
- package/doc/api-reference/functions/QLToolbar.html +1 -0
- package/doc/api-reference/functions/ReplayController.html +1 -0
- package/doc/api-reference/functions/TimeBarModule.html +4 -0
- package/doc/api-reference/functions/TimeRangeSelector.html +1 -0
- package/doc/api-reference/functions/createIndicatorConfig.html +2 -0
- package/doc/api-reference/functions/getToolConfig.html +2 -0
- package/doc/api-reference/functions/getToolsByCategory.html +2 -0
- package/doc/api-reference/functions/getToolsByPriority.html +2 -0
- package/doc/api-reference/functions/mapLibTypeToOurs.html +2 -0
- package/doc/api-reference/functions/mapToolTypeToLib.html +3 -0
- package/doc/api-reference/functions/transformCandlestickData.html +3 -0
- package/doc/api-reference/functions/transformIndicatorData.html +2 -0
- package/doc/api-reference/functions/transformVolumeData.html +3 -0
- package/doc/api-reference/functions/useChart.html +4 -0
- package/doc/api-reference/functions/useChartStore.html +8 -0
- package/doc/api-reference/functions/useCrosshairSync.html +8 -0
- package/doc/api-reference/functions/useDrawingModule.html +1 -0
- package/doc/api-reference/functions/useDrawingStore.html +8 -0
- package/doc/api-reference/functions/useIndicatorStore.html +8 -0
- package/doc/api-reference/functions/useQLChartConfig.html +2 -0
- package/doc/api-reference/functions/useReplayStore.html +8 -0
- package/doc/api-reference/functions/useTheme.html +2 -0
- package/doc/api-reference/functions/useTimeBarStore.html +8 -0
- package/doc/api-reference/index.html +1 -0
- package/doc/api-reference/interfaces/CandlestickData.html +7 -0
- package/doc/api-reference/interfaces/CandlestickRawData.html +8 -0
- package/doc/api-reference/interfaces/ChartFunctionMenuProps.html +2 -0
- package/doc/api-reference/interfaces/ChartManagerCreateOptions.html +4 -0
- package/doc/api-reference/interfaces/ChartOptions.html +8 -0
- package/doc/api-reference/interfaces/ChartRequestParams.html +8 -0
- package/doc/api-reference/interfaces/ChartResponse.html +5 -0
- package/doc/api-reference/interfaces/ChartState.html +24 -0
- package/doc/api-reference/interfaces/ChartThemeOptions.html +5 -0
- package/doc/api-reference/interfaces/CrosshairData.html +5 -0
- package/doc/api-reference/interfaces/DrawingModuleProps.html +5 -0
- package/doc/api-reference/interfaces/DrawingState.html +48 -0
- package/doc/api-reference/interfaces/HistogramData.html +5 -0
- package/doc/api-reference/interfaces/HollowCandlestickData.html +14 -0
- package/doc/api-reference/interfaces/IndicatorConfig.html +11 -0
- package/doc/api-reference/interfaces/IndicatorDataPoint.html +4 -0
- package/doc/api-reference/interfaces/IndicatorDataResponse.html +5 -0
- package/doc/api-reference/interfaces/IndicatorDefinition.html +9 -0
- package/doc/api-reference/interfaces/IndicatorPanelProps.html +3 -0
- package/doc/api-reference/interfaces/IndicatorParamDef.html +8 -0
- package/doc/api-reference/interfaces/IndicatorRawData.html +4 -0
- package/doc/api-reference/interfaces/IndicatorState.html +19 -0
- package/doc/api-reference/interfaces/IndicatorTagProps.html +2 -0
- package/doc/api-reference/interfaces/KlineReplayOptions.html +4 -0
- package/doc/api-reference/interfaces/LayoutSwitcherProps.html +3 -0
- package/doc/api-reference/interfaces/LineData.html +4 -0
- package/doc/api-reference/interfaces/MockDataConfig.html +8 -0
- package/doc/api-reference/interfaces/MockIndicatorConfig.html +5 -0
- package/doc/api-reference/interfaces/PairInfo.html +6 -0
- package/doc/api-reference/interfaces/PaneInfo.html +6 -0
- package/doc/api-reference/interfaces/PanelConfig.html +9 -0
- package/doc/api-reference/interfaces/PersistenceConfig.html +12 -0
- package/doc/api-reference/interfaces/QLChartConfig.html +18 -0
- package/doc/api-reference/interfaces/QLChartLayoutProps.html +9 -0
- package/doc/api-reference/interfaces/QLChartPanelProps.html +13 -0
- package/doc/api-reference/interfaces/QLChartPanelRef.html +14 -0
- package/doc/api-reference/interfaces/QLToolbarProps.html +7 -0
- package/doc/api-reference/interfaces/RealtimeCandle.html +9 -0
- package/doc/api-reference/interfaces/RealtimeSubscribeFn.html +2 -0
- package/doc/api-reference/interfaces/RenkoData.html +16 -0
- package/doc/api-reference/interfaces/ReplayControllerProps.html +2 -0
- package/doc/api-reference/interfaces/ReplayState.html +19 -0
- package/doc/api-reference/interfaces/ThemeConfig.html +14 -0
- package/doc/api-reference/interfaces/TimeBarModuleProps.html +5 -0
- package/doc/api-reference/interfaces/TimeBarState.html +13 -0
- package/doc/api-reference/interfaces/UseChartReturn.html +4 -0
- package/doc/api-reference/interfaces/UseDrawingModuleOptions.html +11 -0
- package/doc/api-reference/interfaces/UseDrawingModuleReturn.html +6 -0
- package/doc/api-reference/interfaces/UseThemeReturn.html +5 -0
- package/doc/api-reference/types/EventHandler.html +2 -0
- package/doc/api-reference/types/FetchFn.html +2 -0
- package/doc/api-reference/types/LayoutMode.html +2 -0
- package/doc/api-reference/types/MarketTrend.html +2 -0
- package/doc/api-reference/types/ThemePreset.html +2 -0
- package/doc/api-reference/variables/BUILTIN_INDICATORS.html +2 -0
- package/doc/api-reference/variables/CATEGORY_LABELS.html +2 -0
- package/doc/api-reference/variables/DRAWING_TOOLS.html +3 -0
- package/doc/api-reference/variables/MARKET_PRESETS.html +1 -0
- package/doc/api-reference/variables/PAIR_PRESETS.html +1 -0
- package/doc/api-reference/variables/darkPreset.html +1 -0
- package/doc/api-reference/variables/lightPreset.html +1 -0
- package/doc/components/drawing-module.md +24 -0
- package/doc/components/indicator-list-panel.md +24 -0
- package/doc/components/indicator-panel.md +17 -0
- package/doc/components/pane-divider.md +25 -0
- package/doc/components/qlchart-layout.md +30 -0
- package/doc/components/qlchart-panel.md +93 -0
- package/doc/components/qlchart-provider.md +73 -0
- package/doc/components/qltoolbar.md +17 -0
- package/doc/components/replay-controller.md +23 -0
- package/doc/components/timebar-module.md +13 -0
- package/doc/core/chart-manager.md +14 -0
- package/doc/core/data-manager.md +33 -0
- package/doc/core/event-manager.md +26 -0
- package/doc/core/pane-manager.md +13 -0
- package/doc/core/series-manager.md +19 -0
- package/doc/core/theme-manager.md +21 -0
- package/doc/examples/basic-chart.md +24 -0
- package/doc/examples/data-format-guide.md +119 -0
- package/doc/examples/drawing-tools.md +30 -0
- package/doc/examples/indicator-properties.md +34 -0
- package/doc/examples/multi-pane.md +24 -0
- package/doc/examples/multi-panel.md +23 -0
- package/doc/examples/realtime-data.md +147 -0
- package/doc/examples/standalone-js.md +333 -0
- package/doc/guide/architecture.md +87 -0
- package/doc/guide/data-flow.md +310 -0
- package/doc/guide/deployment.md +59 -0
- package/doc/guide/drawing-properties.md +40 -0
- package/doc/guide/getting-started.md +94 -0
- package/doc/guide/pane-system.md +47 -0
- package/doc/guide/theme-switching.md +58 -0
- package/doc/hooks/use-chart.md +20 -0
- package/doc/hooks/use-crosshair-sync.md +14 -0
- package/doc/hooks/use-drawing-module.md +43 -0
- package/doc/hooks/use-theme.md +15 -0
- package/doc/index.md +33 -0
- package/doc/plugins/drawing/overview.md +36 -0
- package/doc/plugins/drawing/persistence.md +42 -0
- package/doc/plugins/drawing/tool-registry.md +29 -0
- package/doc/plugins/hollow-candlestick.md +18 -0
- package/doc/plugins/indicators.md +28 -0
- package/doc/plugins/renko.md +17 -0
- package/doc/plugins/replay.md +21 -0
- package/doc/plugins/screenshot.md +20 -0
- package/docs/api.md +94 -0
- package/package.json +54 -0
- package/python/qlchart/__init__.py +9 -0
- package/python/qlchart/__pycache__/__init__.cpython-311.pyc +0 -0
- package/python/qlchart/__pycache__/chart.cpython-311.pyc +0 -0
- package/python/qlchart/chart.py +333 -0
- package/python/qlchart/templates/chart_template.html +304 -0
- package/python/requirements.txt +1 -0
- package/python/setup.py +18 -0
- package/python/tests/__init__.py +1 -0
- package/python/tests/__pycache__/__init__.cpython-311.pyc +0 -0
- package/python/tests/__pycache__/test_chart.cpython-311-pytest-8.3.3.pyc +0 -0
- package/python/tests/test_chart.py +114 -0
- package/quantlife-qlchart-0.0.1.tgz +0 -0
- package/src/api/chartApi.ts +30 -0
- package/src/api/indicatorApi.ts +27 -0
- package/src/components/ChartFunctionMenu.tsx +64 -0
- package/src/components/PaneChartPanel.tsx +116 -0
- package/src/components/PaneDivider.tsx +66 -0
- package/src/components/QLChartLayout.tsx +151 -0
- package/src/components/QLChartPanel.tsx +560 -0
- package/src/components/QLChartProvider.tsx +90 -0
- package/src/components/context-menu/ChartContextMenu.tsx +139 -0
- package/src/components/context-menu/index.ts +2 -0
- package/src/components/drawing/DrawingModule.tsx +36 -0
- package/src/components/drawing/DrawingPropertyPanel.tsx +347 -0
- package/src/components/drawing/DrawingToolbar.tsx +305 -0
- package/src/components/drawing/index.ts +5 -0
- package/src/components/index.ts +43 -0
- package/src/components/indicator/IndicatorListPanel.tsx +94 -0
- package/src/components/indicator/IndicatorModal.tsx +171 -0
- package/src/components/indicator/IndicatorPanel.tsx +9 -0
- package/src/components/indicator/IndicatorPropertyPanel.tsx +130 -0
- package/src/components/indicator/IndicatorTag.tsx +173 -0
- package/src/components/indicator/index.ts +4 -0
- package/src/components/replay/ReplayController.css +97 -0
- package/src/components/replay/ReplayController.tsx +138 -0
- package/src/components/timebar/TimeBarModule.tsx +30 -0
- package/src/components/timebar/TimeRangeSelector.tsx +96 -0
- package/src/components/timebar/index.ts +3 -0
- package/src/components/toolbar/GlobalToolbar.tsx +58 -0
- package/src/components/toolbar/KlineTypeSelector.tsx +123 -0
- package/src/components/toolbar/LayoutSwitcher.tsx +45 -0
- package/src/components/toolbar/PeriodSelector.tsx +35 -0
- package/src/components/toolbar/QLToolbar.tsx +71 -0
- package/src/components/toolbar/TimeRangeSelector.tsx +89 -0
- package/src/components/ui/Modal.tsx +67 -0
- package/src/core/ChartManager.ts +95 -0
- package/src/core/DataManager.ts +427 -0
- package/src/core/EventManager.ts +63 -0
- package/src/core/IndicatorDataProcessor.ts +104 -0
- package/src/core/PaneManager.ts +121 -0
- package/src/core/RealtimeDataFeed.ts +110 -0
- package/src/core/SeriesManager.ts +210 -0
- package/src/core/ThemeManager.ts +59 -0
- package/src/core/index.ts +10 -0
- package/src/css.d.ts +4 -0
- package/src/hooks/useChart.ts +62 -0
- package/src/hooks/useCrosshairSync.ts +109 -0
- package/src/hooks/useDrawingModule.ts +475 -0
- package/src/hooks/useTheme.ts +31 -0
- package/src/index.ts +170 -0
- package/src/mock/MockDataService.ts +102 -0
- package/src/mock/MockIndicatorService.ts +40 -0
- package/src/mock/index.ts +5 -0
- package/src/mock/presets.ts +16 -0
- package/src/plugins/drawing/DrawingAdapter.ts +1762 -0
- package/src/plugins/drawing/DrawingPersistence.ts +273 -0
- package/src/plugins/drawing/DrawingPropertyTemplates.ts +327 -0
- package/src/plugins/drawing/DrawingSharedService.ts +125 -0
- package/src/plugins/drawing/DrawingToolRegistry.ts +684 -0
- package/src/plugins/drawing/TextLabelOverlay.ts +101 -0
- package/src/plugins/drawing/colorUtils.ts +53 -0
- package/src/plugins/drawing/index.ts +10 -0
- package/src/plugins/drawing/lineStyleMap.ts +46 -0
- package/src/plugins/drawing/migration.ts +105 -0
- package/src/plugins/drawing/patterns/PatternDefinitions.ts +57 -0
- package/src/plugins/drawing/patterns/index.ts +2 -0
- package/src/plugins/drawing/periodUtils.ts +51 -0
- package/src/plugins/indicators/AutoIndicatorRenderer.ts +204 -0
- package/src/plugins/indicators/IndicatorRenderer.ts +350 -0
- package/src/plugins/indicators/OverlayIndicator.ts +114 -0
- package/src/plugins/indicators/PaneIndicator.ts +137 -0
- package/src/plugins/indicators/index.ts +4 -0
- package/src/plugins/replay/KlineReplay.ts +163 -0
- package/src/plugins/replay/index.ts +2 -0
- package/src/plugins/screenshot/ScreenshotUtil.ts +123 -0
- package/src/plugins/screenshot/index.ts +1 -0
- package/src/plugins/series/HollowCandlestickSeries.ts +111 -0
- package/src/plugins/series/RenkoSeries.ts +104 -0
- package/src/plugins/series/VolumeCandlestickSeries.ts +127 -0
- package/src/plugins/series/index.ts +6 -0
- package/src/standalone.ts +386 -0
- package/src/store/useChartStore.ts +101 -0
- package/src/store/useDrawingStore.ts +135 -0
- package/src/store/useIndicatorStore.ts +100 -0
- package/src/store/usePanelRegistry.ts +50 -0
- package/src/store/useReplayStore.ts +42 -0
- package/src/store/useTimeBarStore.ts +34 -0
- package/src/styles/chart.css +312 -0
- package/src/styles/components.css +184 -0
- package/src/styles/context-menu.css +60 -0
- package/src/styles/drawing.css +524 -0
- package/src/styles/indicator-modal.css +216 -0
- package/src/styles/indicator-tag.css +210 -0
- package/src/styles/pane-chart.css +9 -0
- package/src/styles/responsive.css +71 -0
- package/src/styles/themes/dark.css +63 -0
- package/src/styles/themes/light.css +61 -0
- package/src/styles/toolbar.css +129 -0
- package/src/types/api.ts +36 -0
- package/src/types/chart.ts +44 -0
- package/src/types/drawing.ts +265 -0
- package/src/types/index.ts +40 -0
- package/src/types/indicator.ts +344 -0
- package/src/types/series.ts +53 -0
- package/src/types/theme.ts +48 -0
- package/src/utils/dataTransformer.ts +63 -0
- package/src/utils/heikinAshi.ts +41 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/lineBreak.ts +88 -0
- package/src/utils/themePresets.ts +69 -0
- package/src/utils/timeFormatter.ts +29 -0
- package/src/utils/timeScaleUtils.ts +68 -0
- package/tsconfig.json +21 -0
- package/typedoc.json +10 -0
- package/vite.config.standalone.ts +31 -0
- package/vite.config.ts +24 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>DRAWING_TOOLS | QLChart API Reference - v0.1.0</title><meta name="description" content="Documentation for QLChart API Reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">QLChart API Reference - v0.1.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">QLChart API Reference</a></li><li><a href="DRAWING_TOOLS.html">DRAWING_TOOLS</a></li></ul><h1>Variable DRAWING_TOOLS<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">DRAWING_TOOLS</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">DrawingToolConfig</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = ...</span></div><div class="tsd-comment tsd-typography"><p>绘图工具注册表
|
|
2
|
+
从 lightweight-charts-drawing 的 68 种工具中筛选出我们需要的 21 种</p>
|
|
3
|
+
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in src/plugins/drawing/DrawingToolRegistry.ts:8</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">QLChart API Reference - v0.1.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>MARKET_PRESETS | QLChart API Reference - v0.1.0</title><meta name="description" content="Documentation for QLChart API Reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">QLChart API Reference - v0.1.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">QLChart API Reference</a></li><li><a href="MARKET_PRESETS.html">MARKET_PRESETS</a></li></ul><h1>Variable MARKET_PRESETS<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">MARKET_PRESETS</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/MockDataConfig.html" class="tsd-signature-type tsd-kind-interface">MockDataConfig</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in src/mock/presets.ts:3</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">QLChart API Reference - v0.1.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PAIR_PRESETS | QLChart API Reference - v0.1.0</title><meta name="description" content="Documentation for QLChart API Reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">QLChart API Reference - v0.1.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">QLChart API Reference</a></li><li><a href="PAIR_PRESETS.html">PAIR_PRESETS</a></li></ul><h1>Variable PAIR_PRESETS<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">PAIR_PRESETS</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/MockDataConfig.html" class="tsd-signature-type tsd-kind-interface">MockDataConfig</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in src/mock/presets.ts:11</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">QLChart API Reference - v0.1.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>darkPreset | QLChart API Reference - v0.1.0</title><meta name="description" content="Documentation for QLChart API Reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">QLChart API Reference - v0.1.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">QLChart API Reference</a></li><li><a href="darkPreset.html">darkPreset</a></li></ul><h1>Variable darkPreset<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">darkPreset</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/ThemeConfig.html" class="tsd-signature-type tsd-kind-interface">ThemeConfig</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in src/utils/themePresets.ts:4</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">QLChart API Reference - v0.1.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base=".."><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>lightPreset | QLChart API Reference - v0.1.0</title><meta name="description" content="Documentation for QLChart API Reference"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search"><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">QLChart API Reference - v0.1.0</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../index.html">QLChart API Reference</a></li><li><a href="lightPreset.html">lightPreset</a></li></ul><h1>Variable lightPreset<code class="tsd-tag">Const</code></h1></div><div class="tsd-signature"><span class="tsd-kind-variable">lightPreset</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/ThemeConfig.html" class="tsd-signature-type tsd-kind-interface">ThemeConfig</a><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in src/utils/themePresets.ts:28</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">QLChart API Reference - v0.1.0</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# DrawingModule
|
|
2
|
+
|
|
3
|
+
绘图工具UI组件,提供21种绘图工具的选择面板。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
通过 `QLChartPanel` 自动集成,无需手动使用。
|
|
8
|
+
|
|
9
|
+
## 绘图工具
|
|
10
|
+
|
|
11
|
+
| 分类 | 工具 |
|
|
12
|
+
|------|------|
|
|
13
|
+
| **基本** | 趋势线、水平线、垂直线、射线 |
|
|
14
|
+
| **形状** | 矩形、三角形、平行通道 |
|
|
15
|
+
| **斐波那契** | 回撤、扩展、时间区 |
|
|
16
|
+
| **标注** | 文本标注、价格标注 |
|
|
17
|
+
| **测量** | 距离测量、角度测量 |
|
|
18
|
+
|
|
19
|
+
## 交互
|
|
20
|
+
|
|
21
|
+
- 选择工具后在图表上点击放置锚点
|
|
22
|
+
- `Esc` 取消当前创建
|
|
23
|
+
- 双击完成动态锚点工具
|
|
24
|
+
- 右键菜单快速切换最近使用的工具
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# IndicatorListPanel
|
|
2
|
+
|
|
3
|
+
指标列表选择面板,按分类展示所有可用指标。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { IndicatorListPanel } from '@quantlife/qlchart'
|
|
9
|
+
|
|
10
|
+
<IndicatorListPanel
|
|
11
|
+
indicators={indicatorList}
|
|
12
|
+
activeKeys={['MA', 'MACD']}
|
|
13
|
+
onSelect={(template) => addIndicator(template)}
|
|
14
|
+
onDeselect={(key) => removeIndicator(key)}
|
|
15
|
+
onClose={() => setShowList(false)}
|
|
16
|
+
/>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 功能
|
|
20
|
+
|
|
21
|
+
- 按分类分组展示指标
|
|
22
|
+
- 搜索过滤
|
|
23
|
+
- 点击切换指标的激活/取消状态
|
|
24
|
+
- 显示指标描述和图标
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# IndicatorPanel / IndicatorTag
|
|
2
|
+
|
|
3
|
+
技术指标展示组件。
|
|
4
|
+
|
|
5
|
+
## IndicatorPanel
|
|
6
|
+
|
|
7
|
+
副图面板,自动渲染 MACD / RSI / KDJ / CCI 等副图指标。
|
|
8
|
+
|
|
9
|
+
当 `useIndicatorStore` 中有副图指标处于活跃状态时,QLChartPanel 会自动创建 IndicatorPanel。
|
|
10
|
+
|
|
11
|
+
## IndicatorTag
|
|
12
|
+
|
|
13
|
+
指标标签,显示在图表顶部,展示当前活跃指标。
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
<IndicatorTag config={indicatorConfig} />
|
|
17
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# PaneDivider
|
|
2
|
+
|
|
3
|
+
可拖拽的pane分割线组件,用于调整主图/副图的高度比例。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { PaneDivider } from '@quantlife/qlchart'
|
|
9
|
+
|
|
10
|
+
<PaneDivider
|
|
11
|
+
index={1}
|
|
12
|
+
onDrag={(deltaRatio) => {
|
|
13
|
+
// deltaRatio > 0: 下方pane变大
|
|
14
|
+
// deltaRatio < 0: 上方pane变大
|
|
15
|
+
adjustPaneRatio(0, 1, deltaRatio)
|
|
16
|
+
}}
|
|
17
|
+
/>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Props
|
|
21
|
+
|
|
22
|
+
| Prop | Type | Description |
|
|
23
|
+
|------|------|-------------|
|
|
24
|
+
| `index` | `number` | pane索引 |
|
|
25
|
+
| `onDrag` | `(deltaRatio: number) => void` | 拖拽回调 |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# QLChartLayout
|
|
2
|
+
|
|
3
|
+
多面板布局容器,支持多个图表面板的灵活布局和光标同步。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { QLChartLayout } from '@quantlife/qlchart'
|
|
9
|
+
|
|
10
|
+
<QLChartLayout mode="2">
|
|
11
|
+
<QLChartPanel pairId="BTCUSDT" product="digital_currency" panelId="panel-1" />
|
|
12
|
+
<QLChartPanel pairId="ETHUSDT" product="digital_currency" panelId="panel-2" />
|
|
13
|
+
</QLChartLayout>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Props
|
|
17
|
+
|
|
18
|
+
| Prop | Type | Default | Description |
|
|
19
|
+
|------|------|---------|-------------|
|
|
20
|
+
| `mode` | `LayoutMode` | `'1'` | 布局模式:`'1'` / `'2'` / `'2v'` / `'4'` |
|
|
21
|
+
| `children` | `ReactNode` | - | 子面板组件 |
|
|
22
|
+
|
|
23
|
+
## 布局模式
|
|
24
|
+
|
|
25
|
+
| Mode | 布局 |
|
|
26
|
+
|------|------|
|
|
27
|
+
| `'1'` | 单面板 |
|
|
28
|
+
| `'2'` | 左右分屏 |
|
|
29
|
+
| `'2v'` | 上下分屏 |
|
|
30
|
+
| `'4'` | 四宫格 |
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# QLChartPanel
|
|
2
|
+
|
|
3
|
+
核心图表面板组件,负责K线渲染、成交量、绘图工具集成、指标展示。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
### 基础用法
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { QLChartPanel } from '@quantlife/qlchart'
|
|
11
|
+
|
|
12
|
+
<QLChartPanel
|
|
13
|
+
pairId="BTCUSDT"
|
|
14
|
+
product="digital_currency"
|
|
15
|
+
period="1h"
|
|
16
|
+
showToolbar
|
|
17
|
+
/>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### 多面板模式
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<QLChartPanel
|
|
24
|
+
pairId="BTCUSDT"
|
|
25
|
+
product="digital_currency"
|
|
26
|
+
panelId="panel-1"
|
|
27
|
+
panelIndex={0}
|
|
28
|
+
onChartCreated={(chart, index) => {
|
|
29
|
+
console.log('Chart created:', chart, index)
|
|
30
|
+
}}
|
|
31
|
+
/>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Props
|
|
35
|
+
|
|
36
|
+
| Prop | Type | Required | Default | Description |
|
|
37
|
+
|------|------|----------|---------|-------------|
|
|
38
|
+
| `pairId` | `string` | ✅ | - | 交易对ID |
|
|
39
|
+
| `product` | `string` | ✅ | - | 产品类型 |
|
|
40
|
+
| `period` | `string` | ❌ | `'1h'` | K线周期 |
|
|
41
|
+
| `seriesType` | `SeriesType` | ❌ | `Candlestick` | 图表序列类型 |
|
|
42
|
+
| `showToolbar` | `boolean` | ❌ | `true` | 是否显示工具栏 |
|
|
43
|
+
| `panelId` | `string` | ❌ | - | 面板ID(多面板必传) |
|
|
44
|
+
| `panelIndex` | `number` | ❌ | - | 面板索引 |
|
|
45
|
+
| `onChartCreated` | `(chart, index) => void` | ❌ | - | Chart创建回调 |
|
|
46
|
+
|
|
47
|
+
## SeriesType 枚举
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
enum SeriesType {
|
|
51
|
+
Candlestick = 'Candlestick',
|
|
52
|
+
Line = 'Line',
|
|
53
|
+
Area = 'Area',
|
|
54
|
+
Bar = 'Bar',
|
|
55
|
+
Histogram = 'Histogram',
|
|
56
|
+
HollowCandlestick = 'HollowCandlestick',
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## 内部功能
|
|
61
|
+
|
|
62
|
+
QLChartPanel 自动集成以下功能:
|
|
63
|
+
|
|
64
|
+
- **K线渲染** — 通过 `fetchFn` 获取数据并渲染
|
|
65
|
+
- **成交量** — 主图底部叠加半透明成交量
|
|
66
|
+
- **绘图工具** — 自动初始化 DrawingAdapter
|
|
67
|
+
- **指标系统** — 根据 `useIndicatorStore` 状态渲染指标
|
|
68
|
+
- **主题应用** — 根据 `defaultTheme` 应用主题配置
|
|
69
|
+
- **副图指标** — MACD/RSI/KDJ 等自动创建副图面板
|
|
70
|
+
|
|
71
|
+
## 事件处理
|
|
72
|
+
|
|
73
|
+
### 面板点击
|
|
74
|
+
|
|
75
|
+
多面板模式下,点击面板会自动设置 `activePanelId`:
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
// 内部行为
|
|
79
|
+
onClick={() => {
|
|
80
|
+
if (panelId) {
|
|
81
|
+
useChartStore.getState().setActivePanel(panelId)
|
|
82
|
+
}
|
|
83
|
+
}}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### 数据重载
|
|
87
|
+
|
|
88
|
+
切换周期或交易对时,QLChartPanel 会:
|
|
89
|
+
1. 清除旧序列 (`seriesManager.clearAll()`)
|
|
90
|
+
2. 重新获取数据
|
|
91
|
+
3. 添加新序列
|
|
92
|
+
4. 更新 DrawingAdapter 的 series 引用
|
|
93
|
+
5. 更新磁铁吸附的 K线数据
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# QLChartProvider
|
|
2
|
+
|
|
3
|
+
顶层 Provider 组件,提供全局配置和 Context。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { QLChartProvider } from '@quantlife/qlchart'
|
|
9
|
+
|
|
10
|
+
<QLChartProvider config={{
|
|
11
|
+
fetchFn: async (params) => {
|
|
12
|
+
const res = await fetch(`/api/klines?${new URLSearchParams(params)}`)
|
|
13
|
+
return res.json()
|
|
14
|
+
},
|
|
15
|
+
defaultTheme: 'dark',
|
|
16
|
+
apiBaseUrl: 'https://api.example.com',
|
|
17
|
+
}}>
|
|
18
|
+
{/* 子组件 */}
|
|
19
|
+
<QLChartPanel pairId="BTCUSDT" product="digital_currency" />
|
|
20
|
+
</QLChartProvider>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
### config
|
|
26
|
+
|
|
27
|
+
| 属性 | 类型 | 必填 | 说明 |
|
|
28
|
+
|------|------|------|------|
|
|
29
|
+
| `fetchFn` | `(params: FetchParams) => Promise<{ data: CandlestickRawData[] }>` | ✅ | K线数据获取函数 |
|
|
30
|
+
| `defaultTheme` | `'dark' \| 'light'` | ❌ | 默认主题 |
|
|
31
|
+
| `apiBaseUrl` | `string` | ❌ | 绘图持久化 API 基础地址 |
|
|
32
|
+
|
|
33
|
+
### FetchParams
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
interface FetchParams {
|
|
37
|
+
pairId: string // 交易对ID,如 "BTCUSDT"
|
|
38
|
+
product: string // 产品类型,如 "digital_currency"
|
|
39
|
+
period: string // K线周期,如 "1h", "4h", "1d"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 使用 Mock 数据
|
|
44
|
+
|
|
45
|
+
开发测试时可以使用内置的 Mock 数据服务:
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import { QLChartProvider, MockDataService } from '@quantlife/qlchart'
|
|
49
|
+
|
|
50
|
+
const fetchFn = MockDataService.createMockFetchFn({
|
|
51
|
+
trend: 'random', // 'random' | 'up' | 'down' | 'side' | 'v-reverse'
|
|
52
|
+
count: 500,
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
<QLChartProvider config={{ fetchFn }}>
|
|
56
|
+
<QLChartPanel pairId="BTCUSDT" product="digital_currency" />
|
|
57
|
+
</QLChartProvider>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Context
|
|
61
|
+
|
|
62
|
+
QLChartProvider 通过 `useQLChartConfig()` 向子组件提供配置:
|
|
63
|
+
|
|
64
|
+
```tsx
|
|
65
|
+
import { useQLChartConfig } from '@quantlife/qlchart'
|
|
66
|
+
|
|
67
|
+
function MyComponent() {
|
|
68
|
+
const config = useQLChartConfig()
|
|
69
|
+
// config.fetchFn
|
|
70
|
+
// config.defaultTheme
|
|
71
|
+
// config.apiBaseUrl
|
|
72
|
+
}
|
|
73
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# QLToolbar
|
|
2
|
+
|
|
3
|
+
工具栏组件,提供周期切换、序列类型切换、主题切换等功能。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
通常通过 `QLChartPanel` 的 `showToolbar` prop 自动渲染,无需手动使用。
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<QLChartPanel showToolbar={true} />
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 功能
|
|
14
|
+
|
|
15
|
+
- **周期切换** — 1m / 5m / 15m / 1h / 4h / 1d / 1w
|
|
16
|
+
- **序列类型** — 蜡烛图 / 折线图 / 面积图 / 柱状图
|
|
17
|
+
- **主题切换** — 暗色 / 亮色
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# ReplayController
|
|
2
|
+
|
|
3
|
+
K线回放控制器,支持历史行情逐根回放,模拟实盘交易练习。
|
|
4
|
+
|
|
5
|
+
## 用法
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ReplayController } from '@quantlife/qlchart'
|
|
9
|
+
|
|
10
|
+
<ReplayController
|
|
11
|
+
practiceId="xxx"
|
|
12
|
+
pairId="BTCUSDT"
|
|
13
|
+
product="digital_currency"
|
|
14
|
+
/>
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 功能
|
|
18
|
+
|
|
19
|
+
- 逐根K线前进/后退
|
|
20
|
+
- 可调节回放速度(1x / 2x / 5x / 10x)
|
|
21
|
+
- 支持暂停/继续
|
|
22
|
+
- 自动回放模式
|
|
23
|
+
- 显示当前回放位置和时间
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# ChartManager
|
|
2
|
+
|
|
3
|
+
管理 `IChartApi` 实例的核心管理器。
|
|
4
|
+
|
|
5
|
+
## 方法
|
|
6
|
+
|
|
7
|
+
| 方法 | 说明 |
|
|
8
|
+
|------|------|
|
|
9
|
+
| `getChart()` | 获取 IChartApi 实例 |
|
|
10
|
+
| `updateOptions(options)` | 更新图表配置 |
|
|
11
|
+
| `resize(width, height)` | 调整图表大小 |
|
|
12
|
+
| `destroy()` | 销毁图表实例 |
|
|
13
|
+
| `getTimeScale()` | 获取时间轴 |
|
|
14
|
+
| `takeScreenshot()` | 截图 |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# DataManager
|
|
2
|
+
|
|
3
|
+
数据转换和缓存管理器。
|
|
4
|
+
|
|
5
|
+
## 数据转换工具
|
|
6
|
+
|
|
7
|
+
### transformCandlestickData
|
|
8
|
+
|
|
9
|
+
将API原始数据转为 lightweight-charts CandlestickData 格式。
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
const data = transformCandlestickData(rawData)
|
|
13
|
+
// { time: UTCTimestamp, open, high, low, close }
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
### transformVolumeData
|
|
17
|
+
|
|
18
|
+
转为成交量 HistogramData,带涨跌半透明颜色。
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
const data = transformVolumeData(rawData)
|
|
22
|
+
// { time: UTCTimestamp, value, color }
|
|
23
|
+
// color: rgba(38, 166, 154, 0.35) 涨 / rgba(239, 83, 80, 0.35) 跌
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### transformIndicatorData
|
|
27
|
+
|
|
28
|
+
转为指标 LineData 格式。
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
const data = transformIndicatorData(rawData)
|
|
32
|
+
// { time: UTCTimestamp, value }
|
|
33
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# EventManager / ChartEvent
|
|
2
|
+
|
|
3
|
+
事件管理器和图表事件系统。
|
|
4
|
+
|
|
5
|
+
## ChartEvent 类型
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
type ChartEvent =
|
|
9
|
+
| 'drawing:added'
|
|
10
|
+
| 'drawing:selected'
|
|
11
|
+
| 'drawing:deselected'
|
|
12
|
+
| 'drawing:updated'
|
|
13
|
+
| 'drawing:removed'
|
|
14
|
+
| 'tool:changed'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## 使用
|
|
18
|
+
|
|
19
|
+
通过 DrawingAdapter 的事件回调订阅:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
adapter.onDrawingCreated((drawing) => { ... })
|
|
23
|
+
adapter.onDrawingSelected((drawing) => { ... })
|
|
24
|
+
adapter.onDrawingRemoved((id) => { ... })
|
|
25
|
+
adapter.onToolChanged((tool) => { ... })
|
|
26
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# SeriesManager
|
|
2
|
+
|
|
3
|
+
管理图表序列(K线、成交量、指标线等)的增删改查。
|
|
4
|
+
|
|
5
|
+
## 方法
|
|
6
|
+
|
|
7
|
+
| 方法 | 说明 |
|
|
8
|
+
|------|------|
|
|
9
|
+
| `addMainSeries(type, options)` | 添加主序列 |
|
|
10
|
+
| `addOverlaySeries(type, options, name)` | 添加叠加序列 |
|
|
11
|
+
| `getFirstMainSeries()` | 获取第一个主序列 |
|
|
12
|
+
| `getSeries(name)` | 按名称获取序列 |
|
|
13
|
+
| `removeSeries(name)` | 移除序列 |
|
|
14
|
+
| `clearAll()` | 清空所有序列 |
|
|
15
|
+
|
|
16
|
+
## 主序列 vs 叠加序列
|
|
17
|
+
|
|
18
|
+
- **主序列**:K线图,id格式 `main_{type}_{timestamp}`
|
|
19
|
+
- **叠加序列**:成交量、指标线等,通过 name 标识
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# ThemeManager
|
|
2
|
+
|
|
3
|
+
主题管理器,管理暗色/亮色主题配置。
|
|
4
|
+
|
|
5
|
+
## 主题预设
|
|
6
|
+
|
|
7
|
+
主题预设定义在 `themePresets.ts` 中。
|
|
8
|
+
|
|
9
|
+
### 暗色主题
|
|
10
|
+
- 背景: `#131722`
|
|
11
|
+
- 文字: `#d1d4dc`
|
|
12
|
+
- 网格: `#1e222d`
|
|
13
|
+
|
|
14
|
+
### 亮色主题
|
|
15
|
+
- 背景: `#ffffff`
|
|
16
|
+
- 文字: `#333333`
|
|
17
|
+
- 网格: `#e0e0e0`
|
|
18
|
+
|
|
19
|
+
## 自定义
|
|
20
|
+
|
|
21
|
+
修改 `themePresets.ts` 或通过 `updateOptions()` 应用自定义配置。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 基础K线示例
|
|
2
|
+
|
|
3
|
+
最小化配置的K线图表。
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { QLChartProvider, QLChartPanel, MockDataService } from '@quantlife/qlchart'
|
|
7
|
+
|
|
8
|
+
const fetchFn = MockDataService.createMockFetchFn({ trend: 'random', count: 500 })
|
|
9
|
+
|
|
10
|
+
function App() {
|
|
11
|
+
return (
|
|
12
|
+
<QLChartProvider config={{ fetchFn, defaultTheme: 'dark' }}>
|
|
13
|
+
<QLChartPanel pairId="BTCUSDT" product="digital_currency" showToolbar />
|
|
14
|
+
</QLChartProvider>
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 效果
|
|
20
|
+
|
|
21
|
+
- 暗色主题K线图
|
|
22
|
+
- 底部半透明成交量
|
|
23
|
+
- 工具栏可切换周期和图表类型
|
|
24
|
+
- 点击 🔧 绘图按钮展开绘图工具
|