This is an automated email from the ASF dual-hosted git repository.

ovilia pushed a commit to branch doc-coarse-pointer
in repository https://gitbox.apache.org/repos/asf/echarts-doc.git

commit 30012190ce73308294e042c2e20a32802e8a8806
Author: Ovilia <zwl.s...@gmail.com>
AuthorDate: Fri Sep 16 15:39:21 2022 +0800

    doc: add doc for coarse pointer apache/echarts#17102
---
 en/api/echarts.md |  7 +++----
 zh/api/echarts.md | 13 +++++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/en/api/echarts.md b/en/api/echarts.md
index 866278b5..b8cfe0ee 100644
--- a/en/api/echarts.md
+++ b/en/api/echarts.md
@@ -35,7 +35,9 @@ Creates an ECharts instance, and returns an 
[echartsInstance](~echartsInstance).
     + `devicePixelRatio` Ratio of one physical pixel to the size of one device 
independent pixels. Browser's `window.devicePixelRatio` is used by default.
     + `renderer`  Supports `'canvas'` or `'svg'`. See [Render by Canvas or 
SVG](${handbookPath}best-practices/canvas-vs-svg).
     + `ssr` Whether to use server-side rendering. Only available in SVG 
rendering mode. When enabled, it will no longer render automatically every 
frame, you have to use the 
[renderToSVGString](~echartsInstance.renderToSVGString) method to get the 
rendered SVG string.
-    + `useDirtyRect`  Enable dirty rectangle rendering or not, `false` by 
default. See [New features in ECharts 
5](${handbookPath}basics/release-note/v5-feature).
+    + `useDirtyRect` Enable dirty rectangle rendering or not, `false` by 
default. See [New features in ECharts 
5](${handbookPath}basics/release-note/v5-feature).
+    + `useCoarsePointer` Whether to expand the response area when interacting 
with elements. `null` means enabling for mobile devices; `true` means always 
enabling; `false` means always disabling. See [Coarse 
Pointer](${handbookPath}how-to/interaction/coarse-pointer) for more information.
+    + `pointerSize` Size of expanded interaction size in pixels. It should be 
used along with `opts.useCoarsePointer`.
     + `width`  Specify width explicitly, in pixel. If setting to 
`null`/`undefined`/`'auto'`, width of `dom` (instance container) will be used.
     + `height`  Specify height explicitly, in pixel. If setting to 
`null`/`undefined`/`'auto'`, height of `dom` (instance container) will be used.
     + `locale` Specify the locale. There are two builtins: `'ZH'` and `'EN'`. 
Or you can use [echarts.registerLocale](~echarts.registerLocale) to register a 
new locale. Or supported locales can be referenced in 
[src/i18n](https://github.com/apache/echarts/tree/release/src/i18n).
@@ -263,6 +265,3 @@ Sets the platform-related API, which may need to be 
provided when non-browser pl
 
 
 {{ use: echarts-graphic }}
-
-
-
diff --git a/zh/api/echarts.md b/zh/api/echarts.md
index 8bc88d5d..ea42514e 100644
--- a/zh/api/echarts.md
+++ b/zh/api/echarts.md
@@ -8,11 +8,13 @@
 (dom?: HTMLDivElement|HTMLCanvasElement, theme?: Object|string, opts?: {
     devicePixelRatio?: number,
     renderer?: string,
-    useDirtyRect?: boolean, // 从 `5.0.0` 开始支持
-    ssr?: boolean,          // 从 `5.3.0` 开始支持
+    useDirtyRect?: boolean,     // 从 `5.0.0` 开始支持
+    useCoarsePointer?: boolean, // 从 `5.4.0` 开始支持
+    pointerSize?: number,       // 从 `5.4.0` 开始支持
+    ssr?: boolean,              // 从 `5.3.0` 开始支持
     width?: number|string,
     height?: number|string,
-    locale?: string         // 从 `5.0.0` 开始支持
+    locale?: string             // 从 `5.0.0` 开始支持
 }) => ECharts
 ```
 创建一个 ECharts 实例,返回 [echartsInstance](~echartsInstance),不能在单个容器上初始化多个 ECharts 
实例。
@@ -37,6 +39,8 @@
     + `renderer` 渲染模式,支持`'canvas'`或者`'svg'`。参见 [使用 Canvas 或者 SVG 
渲染](${handbookPath}best-practices/canvas-vs-svg)。
     + `ssr` 是否使用服务端渲染,只有在 SVG 渲染模式有效。开启后不再会每帧自动渲染,必须要调用 
[renderToSVGString](~echartsInstance.renderToSVGString) 方法才能得到渲染后 SVG 字符串。
     + `useDirtyRect`是否开启脏矩形渲染,只有在 Canvas 渲染模式有效,默认为`false`。参见 [ECharts 5 
新特性](${handbookPath}basics/release-note/v5-feature)。
+    + `useCoarsePointer` 是否扩大可点击元素的响应范围。`null` 表示对移动设备开启;`true` 表示总是开启;`false` 
表示总是不开启。参见[增加交互响应范围](${handbookPath}how-to/interaction/coarse-pointer)。
+    + `pointerSize` 扩大元素响应范围的像素大小,配合 `opts.useCoarsePointer`使用。
     + `width` 可显式指定实例宽度,单位为像素。如果传入值为`null`/`undefined`/`'auto'`,则表示自动取 
`dom`(实例容器)的宽度。
     + `height` 可显式指定实例高度,单位为像素。如果传入值为`null`/`undefined`/`'auto'`,则表示自动取 
`dom`(实例容器)的高度。
     + `locale` 使用的语言,内置 `'ZH'` 和 `'EN'` 两个语言,也可以使用 
[echarts.registerLocale](~echarts.registerLocale) 方法注册新的语言包。目前支持的语言见 
[src/i18n](https://github.com/apache/echarts/tree/release/src/i18n)。
@@ -257,6 +261,3 @@ echarts.registerMap('USA', usaJson, {
 + `loadImage` 加载图片,在使用 Canvas 渲染模式的时候并且使用 URL 作为图片的时候需要提供。
 
 {{ use: echarts-graphic }}
-
-
-


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@echarts.apache.org
For additional commands, e-mail: commits-h...@echarts.apache.org

Reply via email to