@363045841yyt/klinechart 0.4.4 → 0.4.7
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 +10 -5
- package/dist/index.cjs +9 -9
- package/dist/index.js +1844 -1600
- package/dist/klinechart.css +1 -1
- package/dist/src/components/KLineChart.vue.d.ts +16 -5
- package/dist/src/components/KLineTooltip.vue.d.ts +2 -0
- package/dist/src/components/MarkerTooltip.vue.d.ts +3 -0
- package/dist/src/core/chart.d.ts +66 -12
- package/dist/src/core/controller/interaction.d.ts +34 -3
- package/dist/src/core/renderers/Indicator/scale/indicator_scale.d.ts +3 -0
- package/dist/src/core/renderers/Indicator/scale/volume_scale.d.ts +14 -0
- package/dist/src/core/renderers/subVolume.d.ts +6 -2
- package/dist/src/core/theme/colors.d.ts +12 -1
- package/dist/src/plugin/types.d.ts +4 -0
- package/dist/src/utils/kLineDraw/axis.d.ts +2 -0
- package/package.json +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 363045841
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README_EN.md) | 简体中文
|
|
4
4
|
|
|
5
|
-
这是一个基于 Canvas 的金融图表绘制库,提供 Vue 组件封装。专注于高性能 K 线图渲染,支持**语义化 JSON 配置**,便于 AI Agent 直接控制图表渲染。特性包括横向滚动、多种技术指标(MA/BOLL/MACD/RSI 等)、自定义标记标注、多数据源支持(BaoStock、东方财富)。
|
|
6
|
-
|
|
5
|
+
这是一个基于 Canvas 的金融图表绘制库,提供 Vue 组件封装。专注于高性能 K 线图渲染,支持**语义化 JSON 配置**,便于 AI Agent 直接控制图表渲染。特性包括横向滚动、多种技术指标(MA/BOLL/MACD/RSI 等)、自定义标记标注、多数据源支持(BaoStock、东方财富)。
|
|
6
|
+
|
|
7
7
|
[NPM](https://www.npmjs.com/package/@363045841yyt/klinechart) | [GitHub](https://github.com/363045841/KLineChartQuant)
|
|
8
8
|
|
|
9
9
|
## 功能特性
|
|
@@ -184,9 +184,14 @@ const config = ref<SemanticChartConfig>({
|
|
|
184
184
|
免费开源的 Python 证券数据接口,每日支持十万次 API 调用。
|
|
185
185
|
|
|
186
186
|
```bash
|
|
187
|
+
# 方式一:手动安装并启动
|
|
187
188
|
uv pip install baostock
|
|
188
189
|
git clone https://github.com/363045841/stockbao.git
|
|
189
|
-
|
|
190
|
+
cd stockbao
|
|
191
|
+
uv run python ./server.py
|
|
192
|
+
|
|
193
|
+
# 方式二:使用项目内置脚本(需将 stockbao 克隆到父目录)
|
|
194
|
+
pnpm stockbao
|
|
190
195
|
```
|
|
191
196
|
|
|
192
197
|
### AKTools
|
|
@@ -205,14 +210,14 @@ uv run python -m aktools # 启动服务
|
|
|
205
210
|
| 属性 | 类型 | 默认值 | 说明 |
|
|
206
211
|
|------|------|--------|------|
|
|
207
212
|
| semanticConfig | SemanticChartConfig | - | **必需**。语义化配置(唯一控制源) |
|
|
208
|
-
| kWidth | number | 10 | K 线实体宽度 |
|
|
209
|
-
| kGap | number | 2 | K 线间距 |
|
|
210
213
|
| yPaddingPx | number | 0 | Y 轴上下留白像素 |
|
|
211
214
|
| minKWidth | number | 2 | K 线最小宽度 |
|
|
212
215
|
| maxKWidth | number | 50 | K 线最大宽度 |
|
|
213
216
|
| rightAxisWidth | number | 0 | 右侧价格轴宽度 |
|
|
214
217
|
| bottomAxisHeight | number | 24 | 底部时间轴高度 |
|
|
215
218
|
| priceLabelWidth | number | 60 | 价格标签额外宽度(用于显示涨跌幅) |
|
|
219
|
+
| zoomLevels | number | 20 | 缩放级别数量 |
|
|
220
|
+
| initialZoomLevel | number | 3 | 初始缩放级别(1 ~ zoomLevels) |
|
|
216
221
|
|
|
217
222
|
## 环境要求
|
|
218
223
|
|