Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
liihuu committed Feb 18, 2025
1 parent b3efc11 commit 919495b
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 15 deletions.
1 change: 1 addition & 0 deletions docs/@views/api/references/instance/createIndicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
(
indicator: string | {
name: string
id?: string
shortName?: string
precision?: number
calcParams?: unknown[]
Expand Down
3 changes: 2 additions & 1 deletion docs/@views/api/references/instance/getIndicators.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
```typescript
(
filter?: {
id?: string
name?: string
paneId?: string
}
) => Map<string, Indicator[]>
) => Indicator[]
```
2 changes: 1 addition & 1 deletion docs/@views/api/references/instance/getOverlays.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
groupId?: string
paneId?: string
}
) => Map<string, Overlay[]>
) => Overlay[]
```
7 changes: 4 additions & 3 deletions docs/@views/api/references/instance/overrideIndicator.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
```typescript
(
indicator: {
name: string
id?: string
paneId?: string
name?: string
shortName?: string
precision?: number
calcParams?: unknown[]
Expand Down Expand Up @@ -61,7 +63,6 @@
})
draw?: (params: object) => boolean
onDataStateChange?: (params: object) => void
},
paneId?: string
}
) => void
```
1 change: 1 addition & 0 deletions docs/@views/api/references/instance/removeIndicator.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
```typescript
(
filter?: {
id?: string
name?: string
paneId?: string
}
Expand Down
3 changes: 2 additions & 1 deletion docs/api/instance/createIndicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ outline: deep
### 参数 {#parameters}
- `indicator` 指标配置,可以是指标名,也可以是一个对象。对象参数如下。
- `name` 名称。
- `id` 指标 id 。
- `shortName` 简短名称,用于提示显示。
- `precision` 精度。
- `calcParams` 计算参数。
Expand Down Expand Up @@ -56,7 +57,7 @@ outline: deep
- `createTicks` 创建分割信息回调方法。

### 返回值 {#returns}
`createIndicator` 返回窗口id `string` 或者 `null`
`createIndicator` 返回指标id `string` 或者 `null`

## 用法 {#usage}
<script setup>
Expand Down
3 changes: 2 additions & 1 deletion docs/api/instance/getIndicators.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ outline: deep

### 参数 {#parameters}
- `filter` 过滤参数。
- `id` 指标id。
- `name` 指标名称。
- `paneId` 窗口id。


### 返回值 {#returns}
`getIndicators` 返回 `Map<string, Indicator[]>`
`getIndicators` 返回 `Indicator[]`

## 用法 {#usage}
<script setup>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/instance/getOverlays.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ outline: deep


### 返回值 {#returns}
`getOverlays` 返回 `Map<string, Overlay[]>`
`getOverlays` 返回 `Overlay[]`

## 用法 {#usage}
<script setup>
Expand Down
9 changes: 7 additions & 2 deletions docs/api/instance/overrideIndicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
outline: deep
---

# overrideIndicator(indicator, paneId?)
# overrideIndicator(indicator)
`overrideIndicator` 覆盖指标属性。

## 参考 {#reference}
<!-- @include: @/@views/api/references/instance/overrideIndicator.md -->

### 参数 {#parameters}
- `indicator` 指标配置。
- `id` 指标id。
- `paneId` 窗口id。
- `name` 名称。
- `shortName` 简短名称,用于提示显示。
- `precision` 精度。
Expand All @@ -35,7 +37,10 @@ outline: deep
- `createTooltipDataSource` 创建自定义的提示信息。
- `draw` 自定义绘制方法,如果返回值是 `true` ,则会覆盖默认的绘制。
- `onDataStateChange` 数据变化回调通知。
- `paneId` 窗口id。

::: tip 提示
其中 `id``paneId``name` 是索引,如果入参包含这三个参数,会根据这三个参数查找符合条件的指标来覆盖。
:::

### 返回值 {#returns}
`overrideIndicator` 返回 `undefined`
Expand Down
1 change: 1 addition & 0 deletions docs/api/instance/removeIndicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ outline: deep

### 参数 {#parameters}
- `filter` 过滤参数。
- `id` 指标id。
- `name` 指标名称。
- `paneId` 窗口id。

Expand Down
3 changes: 2 additions & 1 deletion docs/en-US/api/instance/createIndicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ outline: deep
### Parameters {#parameters}
- `indicator` Indicator configuration can be an indicator name or an object. The object parameters are as follows.
- `name` Name.
- `id` Indicator id.
- `shortName` A short name, used for prompt display.
- `precision` Precision.
- `calcParams` Calculate the parameters.
Expand Down Expand Up @@ -56,7 +57,7 @@ outline: deep
- `createTicks` Create ticks information callback method.

### Returns {#returns}
`createIndicator` returns pane id `string` or `null` .
`createIndicator` returns indicator id `string` or `null` .

## Usage {#usage}
<script setup>
Expand Down
3 changes: 2 additions & 1 deletion docs/en-US/api/instance/getIndicators.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ outline: deep

### Parameters {#parameters}
- `filter` Filter conditions.
- `id` Indicator id.
- `name` Indicator name.
- `paneId` Pane id.


### Returns {#returns}
`getIndicators` returns `Map<string, Indicator[]>` .
`getIndicators` returns `Indicator[]` .

## Usage {#usage}
<script setup>
Expand Down
2 changes: 1 addition & 1 deletion docs/en-US/api/instance/getOverlays.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ outline: deep


### Returns {#returns}
`getOverlays` returns `Map<string, Overlay[]>` .
`getOverlays` returns `Overlay[]` .

## Usage {#usage}
<script setup>
Expand Down
9 changes: 7 additions & 2 deletions docs/en-US/api/instance/overrideIndicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
outline: deep
---

# overrideIndicator(indicator, paneId?)
# overrideIndicator(indicator)
`overrideIndicator` override indicator attrs.

## Reference {#reference}
<!-- @include: @/@views/api/references/instance/overrideIndicator.md -->

### Parameters {#parameters}
- `indicator` Indicator configuration.
- `id` ID.
- `paneId` Pane id.
- `name` Name.
- `shortName` A short name, used for prompt display.
- `precision` Precision.
Expand All @@ -35,7 +37,10 @@ outline: deep
- `createTooltipDataSource` Create custom prompts.
- `draw` Custom drawing method, if the return value is `true`, it will override the default drawing.
- `onDataStateChange` Data change callback notification.
- `paneId` Pane id.

::: tip Tip
Among them, `id`, `paneId` and `name` are indexes. If the input parameters contain these three parameters, the indicators that meet the conditions will be searched for overwriting based on these three parameters.
:::

### Returns {#returns}
`overrideIndicator` returns `undefined` .
Expand Down
1 change: 1 addition & 0 deletions docs/en-US/api/instance/removeIndicator.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ outline: deep

### Parameters {#parameters}
- `filter` Filter conditions.
- `id` Indicator id.
- `name` Indicator name.
- `paneId` Pane id.

Expand Down
15 changes: 15 additions & 0 deletions docs/en-US/guide/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# 📠 Change Log

## 10.0.0-alpha3
`2025-02-19`
+ 👉 The return value of the instance api `createIndicator` is changed to return the indicator id.
+ 👉 The input parameter `paneId` of the instance api `overlayIndicator` is merged into the input parameter `indicator`.
+ 👉 The return value of the instance api `getIndicators` is changed to return an array.
+ 👉 The return value of the instance api `getOverlays` is changed to return an array.
+ 🆕 The style configuration adds `candle.bar.compareRule`, `indicator.ohlc.compareRule` and `candle.priceMark.last.compareRule`.
+ 🆕 Supports dragging the y-axis on mobile devices.
+ 🆕 Supports creating multiple indicators with the same name on the same window.
+ 💄 Optimize `figure` in `overlay` template to ignore event type, and the event name is consistent with the event name in `overlay`.
+ 🐞 Fix the problem that the indicator custom prompt information may be wrong.
+ 🐞 Fix the problem that the overlay being drawn may not be deleted correctly.
+ 🐞 Fix the problem that the api `createOverlay` may not be created correctly when `points` is specified.
+ 🐞 Fix the problem that the api `executeAction` may cause the `subscribeAction` to trigger infinitely.

## 10.0.0-alpha2
`2024-12-20`
+ 🆕 The x-axis supports displaying future time.
Expand Down
15 changes: 15 additions & 0 deletions docs/guide/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# 📠 更新日志

## 10.0.0-alpha3
`2025-02-19`
+ 👉 实例api `createIndicator` 返回值变更为返回指标id。
+ 👉 实例api `overlayIndicator` 入参 `paneId` 合并到入参 `indicator` 中。
+ 👉 实例api `getIndicators` 返回值变更为返回数组。
+ 👉 实例api `getOverlays` 返回值变更为返回数组。
+ 🆕 样式配置新增 `candle.bar.compareRule``indicator.ohlc.compareRule``candle.priceMark.last.compareRule`
+ 🆕 支持在移动端y轴拖动。
+ 🆕 支持在同一窗口上创建多个相同名称的指标。
+ 💄 优化 `overlay` 模版中的 `figure` 忽略事件类型,事件名和 `overlay` 中的事件名称一致。
+ 🐞 修复指标自定义提示信息可能出错问题。
+ 🐞 修复正在绘制中的覆盖物可能不正确删除问题。
+ 🐞 修复api `createOverlay` 在指定 `points` 时,可能不能正确创建问题。
+ 🐞 修复api `executeAction` 可能导致 `subscribeAction` 无限触发问题。

## 10.0.0-alpha2
`2024-12-20`
+ 🆕 x轴支持显示未来时间。
Expand Down

0 comments on commit 919495b

Please sign in to comment.