From 54144d7894f793264125af28603f455e71a759a7 Mon Sep 17 00:00:00 2001 From: liihuu Date: Tue, 12 Dec 2023 04:52:55 +0800 Subject: [PATCH] docs: v9.7.0 docs --- docs/en-US/guide/changelog.md | 8 ++++++++ docs/en-US/guide/indicator.md | 2 ++ docs/en-US/guide/instance-api.md | 26 ++++++++++++++++++++++---- docs/guide/changelog.md | 8 ++++++++ docs/guide/indicator.md | 4 +++- docs/guide/instance-api.md | 18 ++++++++++++++++++ package.json | 2 +- 7 files changed, 62 insertions(+), 6 deletions(-) diff --git a/docs/en-US/guide/changelog.md b/docs/en-US/guide/changelog.md index 4c228b20c..640ff8ead 100644 --- a/docs/en-US/guide/changelog.md +++ b/docs/en-US/guide/changelog.md @@ -1,5 +1,13 @@ # 📠 Change Log +## 9.7.0 +`2023-12-12` ++ 🆕 Add instance apis`setMaxOffsetLeftDistance` and `setMaxOffsetRightDistance`. ++ 🆕 Add indicator attribute `zLevel`. ++ 💄 Optimize the rendering of the ohlc candle bar. ++ 🐞 Fix the blurry issue with the candle bar. ++ 🐞 Fix the rendering rules for the `zLevel` overlay. + ## 9.6.0 `2023-11-14` + 🖋️ Refactor the separator module. diff --git a/docs/en-US/guide/indicator.md b/docs/en-US/guide/indicator.md index fa155f1f4..f386f40c8 100644 --- a/docs/en-US/guide/indicator.md +++ b/docs/en-US/guide/indicator.md @@ -35,6 +35,8 @@ To create a custom technical indicator, you only need to generate a technical in shouldFormatBigNumber?: boolean // Do you need visible visible?: boolean + // z level + zLevel?: number // extended data extendData?: any // series, default is 'normal' diff --git a/docs/en-US/guide/instance-api.md b/docs/en-US/guide/instance-api.md index f93dc7e9b..47b8659e2 100644 --- a/docs/en-US/guide/instance-api.md +++ b/docs/en-US/guide/instance-api.md @@ -96,7 +96,7 @@ Whether dragging and scrolling is possible. ```typescript (distance: number) => void ``` -Sets the gap that can be left to the right of the chart. +Set the gap that can be left to the right of the chart. ## getOffsetRightDistance() ```typescript @@ -105,25 +105,39 @@ Sets the gap that can be left to the right of the chart. Get the gap that can be left to the right of the chart. +## setMaxOffsetLeftDistance() +```typescript +(distance: number) => void +``` +Set the maximum available gap on the left side of the chart. + + +## setMaxOffsetRightDistance() +```typescript +(distance: number) => void +``` +Set the maximum available gap on the right side of the chart. + + ## setLeftMinVisibleBarCount(barCount) ```typescript (barCount: number) => void ``` -Sets the minimum number of visible candles to the left. +Set the minimum number of visible candles to the left. ## setRightMinVisibleBarCount(barCount) ```typescript (barCount: number) => void ``` -Sets the minimum number of visible candles to the right. +Set the minimum number of visible candles to the right. ## setBarSpace(space) ```typescript (space: number) => void ``` -Sets the width of a single candlestick of the chart. +Set the width of a single candlestick of the chart. ## getBarSpace() @@ -248,6 +262,7 @@ Set load more callback function. shouldOhlc?: boolean shouldFormatBigNumber?: boolean visible?: boolean + zLevel?: number extendData?: any series?: 'normal' | 'price' | 'volume' figures?: Array<{ @@ -358,6 +373,7 @@ chart.createIndicator('MA', false, { shouldOhlc?: boolean shouldFormatBigNumber?: boolean visible?: boolean + zLevel?: number extendData?: any series?: 'normal' | 'price' | 'volume' figures?: Array<{ @@ -415,6 +431,7 @@ Overlay technical indicator information. - `shouldOhlc` needs ohlc auxiliary graphics - `shouldFormatBigNumber` should format large numbers. For example, 1000 is converted to 1k, 1000000 is converted to 1M, etc. - `visible` visible or not + - `zLevel` z level - `extendData` extended data - `series` indicator series, optional options are 'normal', 'price' and 'volume' - `figures` graphics configuration @@ -441,6 +458,7 @@ chart.overrideIndicator({ shouldOhlc: true, shouldFormatBigNumber: false, visible: true, + zLevel: 1, extendData: 2432435, series: 'price', figures: [], diff --git a/docs/guide/changelog.md b/docs/guide/changelog.md index edc431825..1a67b9daa 100644 --- a/docs/guide/changelog.md +++ b/docs/guide/changelog.md @@ -1,5 +1,13 @@ # 📠 更新日志 +## 9.7.0 +`2023-12-12` ++ 🆕 实例方法新增`setMaxOffsetLeftDistance`和`setMaxOffsetRightDistance`。 ++ 🆕 指标新增`zLevel`属性。 ++ 💄 优化`ohlc`蜡烛柱渲染。 ++ 🐞 修复蜡烛柱模糊问题。 ++ 🐞 修复覆盖物`zLevel`渲染规则。 + ## 9.6.0 `2023-11-14` + 🖋️ 重构窗口之间的分割线模块。 diff --git a/docs/guide/indicator.md b/docs/guide/indicator.md index ab43b4eb2..b80159e3f 100644 --- a/docs/guide/indicator.md +++ b/docs/guide/indicator.md @@ -34,7 +34,9 @@ // 是否需要格式化大数据值,从1000开始格式化,比如100000是否需要格式化100K shouldFormatBigNumber?: boolean // 是否可见 - visible?: boolean + visible?: boolean + // 层级 + zLevel?: number // 扩展数据 extendData?: any // 系列,默认为'normal' diff --git a/docs/guide/instance-api.md b/docs/guide/instance-api.md index a8d023d63..10cf85ddf 100644 --- a/docs/guide/instance-api.md +++ b/docs/guide/instance-api.md @@ -106,6 +106,20 @@ 获取图表右边可以空出来的间隙。 +## setMaxOffsetLeftDistance() +```typescript +(distance: number) => void +``` +设置图表左边最大可空出来的间隙。 + + +## setMaxOffsetRightDistance() +```typescript +(distance: number) => void +``` +设置图表右边最大可空出来的间隙。 + + ## setLeftMinVisibleBarCount(barCount) ```typescript (barCount: number) => void @@ -250,6 +264,7 @@ shouldOhlc?: boolean shouldFormatBigNumber?: boolean visible?: boolean + zLevel?: number extendData?: any series?: 'normal' | 'price' | 'volume' figures?: Array<{ @@ -362,6 +377,7 @@ chart.createIndicator('MA', false, { shouldOhlc?: boolean shouldFormatBigNumber?: boolean visible?: boolean + zLevel?: number extendData?: any series?: 'normal' | 'price' | 'volume' figures?: Array<{ @@ -425,6 +441,7 @@ chart.createIndicator('MA', false, { - `shouldOhlc` 是否需要ohlc辅助图形 - `shouldFormatBigNumber` 是否需要格式化大的数字。如1000转换成1k,1000000转换为1M等 - `visible` 是否可见 + - `zLevel` 层级 - `extendData` 扩展数据 - `series` 指标系列,可选项有'normal','price'和'volume' - `figures` 图形配置 @@ -451,6 +468,7 @@ chart.overrideIndicator({ shouldOhlc: true, shouldFormatBigNumber: false, visible: true, + zLevel: 1, extendData: 2432435, series: 'price', figures: [], diff --git a/package.json b/package.json index 6c6ca27e0..1c3f984c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "klinecharts", - "version": "9.6.0", + "version": "9.7.0", "description": "Lightweight k-line chart built with html5 canvas", "main": "./dist/index.cjs", "module": "./dist/index.esm.js",