Skip to content

Commit 9c5814a

Browse files
committed
docs: v10.0.0-alpha5 docs
1 parent 6556d07 commit 9c5814a

20 files changed

+154
-60
lines changed

docs/@views/api/references/chart/registerIndicator.md

+27-10
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,32 @@
3535
createTooltipDataSource?: (params: object) => ({
3636
name?: string
3737
calcParamsText?: string
38-
icons?: Array<{
39-
id?: string
40-
position?: 'left' | 'middle' | 'right'
41-
color?: string
42-
activeColor?: string
43-
size?: number
44-
fontFamily?: string
45-
icon?: string
46-
backgroundColor?: string
47-
activeBackgroundColor?: string
38+
features?: Array<{
39+
id?: string
40+
position?: 'left' | 'middle' | 'right'
41+
marginLeft?: number
42+
marginTop?: number
43+
marginRight?: number
44+
marginBottom?: number
45+
paddingLeft?: number
46+
paddingTop?: number
47+
paddingRight?: number
48+
paddingBottom?: number
49+
size?: number
50+
color?: string
51+
activeColor?: string
52+
backgroundColor?: string
53+
activeBackgroundColor?: string
54+
type?: 'path' | 'iconFont'
55+
path?: {
56+
style?: 'stroke' | 'fill'
57+
path?: string
58+
lineWidth?: number
59+
}
60+
iconFont?: {
61+
content?: string
62+
family?: string
63+
}
4864
}>
4965
legends?: Array<{
5066
title: string |
@@ -60,6 +76,7 @@
6076
}>
6177
})
6278
draw?: (params: object) => boolean
79+
onClick?: (params: object) => void
6380
onDataStateChange?: (params: object) => void
6481
}
6582
) => void

docs/@views/api/references/instance/createIndicator.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,32 @@
3636
createTooltipDataSource?: (params: object) => ({
3737
name?: string
3838
calcParamsText?: string
39-
icons?: Array<{
39+
features?: Array<{
4040
id?: string
4141
position?: 'left' | 'middle' | 'right'
42+
marginLeft?: number
43+
marginTop?: number
44+
marginRight?: number
45+
marginBottom?: number
46+
paddingLeft?: number
47+
paddingTop?: number
48+
paddingRight?: number
49+
paddingBottom?: number
50+
size?: number
4251
color?: string
4352
activeColor?: string
44-
size?: number
45-
fontFamily?: string
46-
icon?: string
4753
backgroundColor?: string
4854
activeBackgroundColor?: string
55+
type?: 'path' | 'iconFont'
56+
path?: {
57+
style?: 'stroke' | 'fill'
58+
path?: string
59+
lineWidth?: number
60+
}
61+
iconFont?: {
62+
content?: string
63+
family?: string
64+
}
4965
}>
5066
legends?: Array<{
5167
title: string |
@@ -61,6 +77,7 @@
6177
}>
6278
})
6379
draw?: (params: object) => boolean
80+
onClick?: (params: object) => void
6481
onDataStateChange?: (params: object) => void
6582
},
6683
isStack?: boolean,

docs/@views/api/references/instance/overrideIndicator.md

+21-4
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,32 @@
3737
createTooltipDataSource?: (params: object) => ({
3838
name?: string
3939
calcParamsText?: string
40-
icons?: Array<{
40+
features?: Array<{
4141
id?: string
4242
position?: 'left' | 'middle' | 'right'
43+
marginLeft?: number
44+
marginTop?: number
45+
marginRight?: number
46+
marginBottom?: number
47+
paddingLeft?: number
48+
paddingTop?: number
49+
paddingRight?: number
50+
paddingBottom?: number
51+
size?: number
4352
color?: string
4453
activeColor?: string
45-
size?: number
46-
fontFamily?: string
47-
icon?: string
4854
backgroundColor?: string
4955
activeBackgroundColor?: string
56+
type?: 'path' | 'iconFont'
57+
path?: {
58+
style?: 'stroke' | 'fill'
59+
path?: string
60+
lineWidth?: number
61+
}
62+
iconFont?: {
63+
content?: string
64+
family?: string
65+
}
5066
}>
5167
legends?: Array<{
5268
title: string |
@@ -62,6 +78,7 @@
6278
}>
6379
})
6480
draw?: (params: object) => boolean
81+
onClick?: (params: object) => void
6582
onDataStateChange?: (params: object) => void
6683
}
6784
) => void

docs/@views/api/references/instance/subscribeAction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
type: 'onZoom' |
44
'onScroll' |
55
'onVisibleRangeChange' |
6-
'onTooltipIconClick' |
6+
'onCandleTooltipFeatureClick' |
77
'onCrosshairChange' |
88
'onCandleBarClick' |
99
'onPaneDrag',

docs/@views/api/references/instance/unsubscribeAction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
type: 'onZoom' |
44
'onScroll' |
55
'onVisibleRangeChange' |
6-
'onTooltipIconClick' |
6+
'onCandleTooltipFeatureClick' |
77
'onCrosshairChange' |
88
'onCandleBarClick' |
99
'onPaneDrag',

docs/@views/styles/config.md

+52-34
Original file line numberDiff line numberDiff line change
@@ -157,24 +157,33 @@ const styles = {
157157
},
158158
// e.g.
159159
// [{
160-
// id: 'icon_id',
161-
// position: 'left', // 'left', 'middle', 'right'
162-
// marginLeft: 8,
163-
// marginTop: 6,
164-
// marginRight: 0,
165-
// marginBottom: 0,
166-
// paddingLeft: 1,
167-
// paddingTop: 1,
168-
// paddingRight: 1,
169-
// paddingBottom: 1,
170-
// icon: '\ue900',
171-
// fontFamily: 'iconfont',
172-
// size: 12,
173-
// color: '#76808F',
174-
// backgroundColor: 'rgba(33, 150, 243, 0.2)',
175-
// activeBackgroundColor: 'rgba(33, 150, 243, 0.4)'
160+
// id: 'icon_id',
161+
// position: 'left', // 'left', 'middle', 'right'
162+
// marginLeft: 8,
163+
// marginTop: 6,
164+
// marginRight: 0,
165+
// marginBottom: 0,
166+
// paddingLeft: 1,
167+
// paddingTop: 1,
168+
// paddingRight: 1,
169+
// paddingBottom: 1,
170+
// size: 12,
171+
// color: '#76808F',
172+
// activeColor: '#76808F',
173+
// backgroundColor: 'rgba(33, 150, 243, 0.2)',
174+
// activeBackgroundColor: 'rgba(33, 150, 243, 0.4)',
175+
// type: 'path', // 'path', 'iconFont'
176+
// path: {
177+
// style: 'stroke', // 'stroke', 'fill'
178+
// path: 'M6.81029,6.02908L11.7878,1.02746C12.0193,0.79483,12.0193,0.445881,11.7878,0.213247C11.5563,-0.019386,11.209,-0.019386,10.9775,0.213247L6,5.21486L1.02251,0.174475C0.790997,-0.0581583,0.44373,-0.0581583,0.212219,0.174475C-0.0192925,0.407108,-0.0192925,0.756058,0.212219,0.988691L5.18971,6.02908L0.173633,11.0307C-0.0578778,11.2633,-0.0578778,11.6123,0.173633,11.8449C0.289389,11.9612,0.44373,12,0.598071,12C0.752411,12,0.906752,11.9612,1.02251,11.8449L6,6.8433L10.9775,11.8449C11.0932,11.9612,11.2476,12,11.4019,12C11.5563,12,11.7106,11.9612,11.8264,11.8449C12.0579,11.6123,12.0579,11.2633,11.8264,11.0307L6.81029,6.02908Z',
179+
// lineWidth: 1,
180+
// },
181+
// iconFont: {
182+
// content: '\ue900',
183+
// family: 'iconfont'
184+
// }
176185
// }]
177-
icons: []
186+
features: []
178187
}
179188
},
180189
indicator: {
@@ -286,24 +295,33 @@ const styles = {
286295
},
287296
// e.g.
288297
// [{
289-
// id: 'icon_id',
290-
// position: 'left', // 'left', 'middle', 'right'
291-
// marginLeft: 8,
292-
// marginTop: 6,
293-
// marginRight: 0,
294-
// marginBottom: 0,
295-
// paddingLeft: 1,
296-
// paddingTop: 1,
297-
// paddingRight: 1,
298-
// paddingBottom: 1,
299-
// icon: '\ue900',
300-
// fontFamily: 'iconfont',
301-
// size: 12,
302-
// color: '#76808F',
303-
// backgroundColor: 'rgba(33, 150, 243, 0.2)',
304-
// activeBackgroundColor: 'rgba(33, 150, 243, 0.4)'
298+
// id: 'icon_id',
299+
// position: 'left', // 'left', 'middle', 'right'
300+
// marginLeft: 8,
301+
// marginTop: 6,
302+
// marginRight: 0,
303+
// marginBottom: 0,
304+
// paddingLeft: 1,
305+
// paddingTop: 1,
306+
// paddingRight: 1,
307+
// paddingBottom: 1,
308+
// size: 12,
309+
// color: '#76808F',
310+
// activeColor: '#76808F',
311+
// backgroundColor: 'rgba(33, 150, 243, 0.2)',
312+
// activeBackgroundColor: 'rgba(33, 150, 243, 0.4)',
313+
// type: 'path', // 'path', 'iconFont'
314+
// path: {
315+
// style: 'stroke', // 'stroke', 'fill'
316+
// path: 'M6.81029,6.02908L11.7878,1.02746C12.0193,0.79483,12.0193,0.445881,11.7878,0.213247C11.5563,-0.019386,11.209,-0.019386,10.9775,0.213247L6,5.21486L1.02251,0.174475C0.790997,-0.0581583,0.44373,-0.0581583,0.212219,0.174475C-0.0192925,0.407108,-0.0192925,0.756058,0.212219,0.988691L5.18971,6.02908L0.173633,11.0307C-0.0578778,11.2633,-0.0578778,11.6123,0.173633,11.8449C0.289389,11.9612,0.44373,12,0.598071,12C0.752411,12,0.906752,11.9612,1.02251,11.8449L6,6.8433L10.9775,11.8449C11.0932,11.9612,11.2476,12,11.4019,12C11.5563,12,11.7106,11.9612,11.8264,11.8449C12.0579,11.6123,12.0579,11.2633,11.8264,11.0307L6.81029,6.02908Z',
317+
// lineWidth: 1,
318+
// },
319+
// iconFont: {
320+
// content: '\ue900',
321+
// family: 'iconfont'
322+
// }
305323
// }]
306-
icons: []
324+
features: []
307325
}
308326
},
309327
xAxis: {

docs/api/chart/registerIndicator.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ outline: deep
3434
- `regenerateFigures` 重新生成基础图形配置,当 `calcParams` 变化时触发,返回值类型同 `figures`
3535
- `createTooltipDataSource` 创建自定义的提示信息。
3636
- `draw` 自定义绘制方法,如果返回值是 `true` ,则会覆盖默认的绘制。
37+
- `onClick` 点击事件。
3738
- `onDataStateChange` 数据变化回调通知。
3839

3940
### 返回值 {#returns}

docs/api/instance/createIndicator.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ outline: deep
3535
- `regenerateFigures` 重新生成基础图形配置,当 `calcParams` 变化时触发,返回值类型同 `figures`
3636
- `createTooltipDataSource` 创建自定义的提示信息。
3737
- `draw` 自定义绘制方法,如果返回值是 `true` ,则会覆盖默认的绘制。
38+
- `onClick` 点击事件。
3839
- `onDataStateChange` 数据变化回调通知。
3940
- `isStack` 是否叠加。
4041
- `paneOptions` 窗口配置。

docs/api/instance/overrideIndicator.md

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ outline: deep
3636
- `regenerateFigures` 重新生成基础图形配置,当 `calcParams` 变化时触发,返回值类型同 `figures`
3737
- `createTooltipDataSource` 创建自定义的提示信息。
3838
- `draw` 自定义绘制方法,如果返回值是 `true` ,则会覆盖默认的绘制。
39+
- `onClick` 点击事件。
3940
- `onDataStateChange` 数据变化回调通知。
4041

4142
::: tip 提示

docs/api/instance/subscribeAction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ outline: deep
99
<!-- @include: @/@views/api/references/instance/subscribeAction.md -->
1010

1111
### 参数 {#parameters}
12-
- `type` 类型,支持 `onZoom``onScroll``onVisibleRangeChange``onTooltipIconClick``onCrosshairChange``onCandleBarClick``onPaneDrag`
12+
- `type` 类型,支持 `onZoom``onScroll``onVisibleRangeChange``onCandleTooltipFeatureClick``onCrosshairChange``onCandleBarClick``onPaneDrag`
1313
- `cb` 回调方法。
1414

1515
### 返回值 {#returns}

docs/api/instance/unsubscribeAction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ outline: deep
99
<!-- @include: @/@views/api/references/instance/unsubscribeAction.md -->
1010

1111
### 参数 {#parameters}
12-
- `type` 类型,支持 `onZoom``onScroll``onVisibleRangeChange``onTooltipIconClick``onCrosshairChange``onCandleBarClick``onPaneDrag`
12+
- `type` 类型,支持 `onZoom``onScroll``onVisibleRangeChange``onCandleTooltipFeatureClick``onCrosshairChange``onCandleBarClick``onPaneDrag`
1313
- `cb` 订阅时的回调方法,缺省则取消当前类型所有。
1414

1515
### 返回值 {#returns}

docs/en-US/api/chart/registerIndicator.md

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ outline: deep
3434
- `regenerateFigures` Regenerates the basic graphics configuration. This is triggered when `calcParams` changes. The return value type is the same as `figures` .
3535
- `createTooltipDataSource` Create custom prompts.
3636
- `draw` Custom drawing method, if the return value is `true`, it will override the default drawing.
37+
- `onClick` Click event.
3738
- `onDataStateChange` Data change callback notification.
3839

3940
### Returns {#returns}

docs/en-US/api/instance/createIndicator.md

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ outline: deep
3535
- `regenerateFigures` Regenerates the basic graphics configuration. This is triggered when `calcParams` changes. The return value type is the same as `figures` .
3636
- `createTooltipDataSource` Create custom prompts.
3737
- `draw` Custom drawing method, if the return value is `true`, it will override the default drawing.
38+
- `onClick` Click event.
3839
- `onDataStateChange` Data change callback notification.
3940
- `isStack` Whether to stack.
4041
- `paneOptions` Pane configuration.

docs/en-US/api/instance/overrideIndicator.md

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ outline: deep
3636
- `regenerateFigures` Regenerates the basic graphics configuration. This is triggered when `calcParams` changes. The return value type is the same as `figures` .
3737
- `createTooltipDataSource` Create custom prompts.
3838
- `draw` Custom drawing method, if the return value is `true`, it will override the default drawing.
39+
- `onClick` Click event.
3940
- `onDataStateChange` Data change callback notification.
4041

4142
::: tip Tip

docs/en-US/api/instance/subscribeAction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ outline: deep
99
<!-- @include: @/@views/api/references/instance/subscribeAction.md -->
1010

1111
### Parameters {#parameters}
12-
- `type` Type, supports `onZoom`, `onScroll`, `onVisibleRangeChange`, `onTooltipIconClick`, `onCrosshairChange`, `onCandleBarClick` and `onPaneDrag` .
12+
- `type` Type, supports `onZoom`, `onScroll`, `onVisibleRangeChange`, `onCandleTooltipFeatureClick`, `onCrosshairChange`, `onCandleBarClick` and `onPaneDrag` .
1313
- `cb` Callback.
1414

1515
### Returns {#returns}

docs/en-US/api/instance/unsubscribeAction.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ outline: deep
99
<!-- @include: @/@views/api/references/instance/unsubscribeAction.md -->
1010

1111
### Parameters {#parameters}
12-
- `type` Type, supports `onZoom`, `onScroll`, `onVisibleRangeChange`, `onTooltipIconClick`, `onCrosshairChange`, `onCandleBarClick` and `onPaneDrag` .
12+
- `type` Type, supports `onZoom`, `onScroll`, `onVisibleRangeChange`, `onCandleTooltipFeatureClick`, `onCrosshairChange`, `onCandleBarClick` and `onPaneDrag` .
1313
- `cb` The callback method when subscribing. By default, all subscriptions of the current type are canceled.
1414

1515
### Returns {#returns}

docs/en-US/guide/changelog.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# 📠 Change Log
22

3+
## 10.0.0-alpha5
4+
`2025-03-09`
5+
+ 👉 Style configuration `candle.tooltip.icons` changed to `candle.tooltip.features`, `indicator.tooltip.icons` changed to `indicator.tooltip.features`.
6+
+ 👉 `icons` in the return value of the `createTooltipDataSource` method in the indicator changed to `features`.
7+
+ 👉 The instance api `subscribeAction` and `unsubscribeAction` input parameter `onTooltipIconClick` changed to `onCandleTooltipFeatureClick`, and the indicator event is replaced by `indicator.onClick`.
8+
+ 🐞 Fixed the problem that scrolling cannot be performed in certain situations on mobile terminals.
9+
+ 💄 Optimize the display of overlay event response.
10+
311
## 10.0.0-alpha4
412
`2025-02-23`
513
+ 🐞 Fix the issue that the parameter `more.backward` of `applyNewData` instance method is incorrect.

docs/guide/changelog.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# 📠 更新日志
22

3+
## 10.0.0-alpha5
4+
`2025-03-09`
5+
+ 👉 样式配置 `candle.tooltip.icons` 变更为 `candle.tooltip.features``indicator.tooltip.icons` 变更为 `indicator.tooltip.features`
6+
+ 👉 指标中的 `createTooltipDataSource` 方法返回值中的 `icons` 变更为 `features`
7+
+ 👉 实例api `subscribeAction``unsubscribeAction` 入参 `onTooltipIconClick` 变更为 `onCandleTooltipFeatureClick` ,指标的事件用 `indicator.onClick` 代替。
8+
+ 🐞 修复移动端特定情况下无法滚动问题。
9+
+ 💄 优化覆盖物事件响应显示。
10+
311
## 10.0.0-alpha4
412
`2025-02-23`
513
+ 🐞 修复实例方法 `applyNewData` 入参 `more.backward` 不对问题。

docs/guide/v9-to-v10.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
## 样式配置调整
55
+ 删除 `yAxis.position``yAxis.type``yAxis.inside``yAxis.inside` ,请使用窗口配置 `axis` 中的属性代替。详情参阅图表API [init(dcs, options)](/api/chart/init#parameters) ,实例API [createIndicator(value, isStack, paneOptions)](/api/instance/createIndicator#parameters)[setPaneOptions(options)](/api/instance/setPaneOptions#parameters)
66
+ 删除 `overlay.rectText`
7+
+ `candle.tooltip.icons` 变更为 `candle.tooltip.features``indicator.tooltip.icons` 变更为 `indicator.tooltip.features`
78

89
## API调整
910

@@ -16,10 +17,12 @@
1617
+ 删除 `applyMoreData(dataList, more, callback)``setLoadDataCallback(cb)``loadMore(cb)` ,请使用 `setLoadMoreDataCallback(cb)` 代替。
1718
+ 删除 `getIndicatorByPaneId(paneId, name)` ,请使用 `getIndicators(filter)` 代替。
1819
+ 删除 `getOverlayById(id)` ,请使用 `getOverlays(filter)` 代替。
20+
+ 删除 `subscribeAction``unsubscribeAction` 中的 `onTooltipIconClick` ,请使用 `onCandleTooltipFeatureClick` 和指标中的 `onClick` 代替。
1921
+ `applyNewData(dataList, more, callback)` 变更为 `applyNewData(dataList, more)`
2022
+ `updateData(data, callback)` 变更为 `updateData(data)`
2123
+ `getBarSpace()` 返回值变更为对象。
24+
+ `createIndicator` 返回值变更为返回指标id。
2225

2326
## 自定义扩展调整
24-
+ 指标 `createTooltipDataSource` 方法返回值 `values` 变更为 `legends`
27+
+ 指标 `createTooltipDataSource` 方法返回值 `values` 变更为 `legends` `icons` 变更为 `features`
2528
+ 删除内置的基础图形 `rectText` ,请使用 `text` 代替。

0 commit comments

Comments
 (0)