feat(web): K线图库对比 —— TradingView Lightweight Charts 实现 + 双库切换
- 按确认方案「两套实现并存对比」:
- npm 依赖 lightweight-charts@4.2.3(v3 §21 推荐库)
- components/StockChart/chartTypes.ts:共享 props 接口
- CandleChart.tsx(ECharts 版,重构复用共享类型)+ CandleChartLW.tsx
(Lightweight 版:蜡烛+成交量副刻度+MA+成交实心箭头/未成交信号圆点 markers)
- StockChart.tsx wrapper;个股页顶部「ECharts / Lightweight」切换(默认 Lightweight)
- /stocks/600519.SH 冒烟 200;tsc --noEmit 通过
This commit is contained in:
Generated
+15
@@ -11,6 +11,9 @@ importers:
|
||||
echarts:
|
||||
specifier: ^5.5.1
|
||||
version: 5.6.0
|
||||
lightweight-charts:
|
||||
specifier: ^4.2.3
|
||||
version: 4.2.3
|
||||
next:
|
||||
specifier: ^15.1.0
|
||||
version: 15.5.25(@types/node@22.20.1)(react-dom@19.2.8(react@19.2.8))(react@19.2.8)
|
||||
@@ -286,6 +289,12 @@ packages:
|
||||
echarts@5.6.0:
|
||||
resolution: {integrity: sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==}
|
||||
|
||||
fancy-canvas@2.1.0:
|
||||
resolution: {integrity: sha512-nifxXJ95JNLFR2NgRV4/MxVP45G9909wJTEKz5fg/TZS20JJZA6hfgRVh/bC9bwl2zBtBNcYPjiBE4njQHVBwQ==}
|
||||
|
||||
lightweight-charts@4.2.3:
|
||||
resolution: {integrity: sha512-5kS/2hY3wNYNzhnS8Gb+GAS07DX8GPF2YVDnd2NMC85gJVQ6RLU6YrXNgNJ6eg0AnWPwCnvaGtYmGky3HiLQEw==}
|
||||
|
||||
nanoid@3.3.18:
|
||||
resolution: {integrity: sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==}
|
||||
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
|
||||
@@ -549,6 +558,12 @@ snapshots:
|
||||
tslib: 2.3.0
|
||||
zrender: 5.6.1
|
||||
|
||||
fancy-canvas@2.1.0: {}
|
||||
|
||||
lightweight-charts@4.2.3:
|
||||
dependencies:
|
||||
fancy-canvas: 2.1.0
|
||||
|
||||
nanoid@3.3.18: {}
|
||||
|
||||
next@15.5.25(@types/node@22.20.1)(react-dom@19.2.8(react@19.2.8))(react@19.2.8):
|
||||
|
||||
Reference in New Issue
Block a user