diff --git a/docs/assets/option/en/graphic/attribute.md b/docs/assets/option/en/graphic/attribute.md index 00adde5a51..cb25bfdc34 100644 --- a/docs/assets/option/en/graphic/attribute.md +++ b/docs/assets/option/en/graphic/attribute.md @@ -15,17 +15,17 @@ ) }} {{ /if }} -#${prefix} opacity(number) +#${prefix} opacity(number|function) Overall transparency setting. -#${prefix} cursor(string) +#${prefix} cursor(string|function) What is the cursor style when the mouse hovers over the graphic element? Same as CSS cursor. {{ if: !${noTexture} }} -#${prefix} texture(string) +#${prefix} texture(string|function) Texture type configuration, supports: `'circle' | 'diamond' | 'rect' | 'vertical-line' | 'horizontal-line' | 'bias-lr' | 'bias-rl' | 'grid'`. @@ -40,69 +40,69 @@ style: { } ``` -#${prefix} textureColor(string) +#${prefix} textureColor(string|function) Texture color. -#${prefix} textureSize(number) +#${prefix} textureSize(number|function) Size of the texture unit. -#${prefix} texturePadding(number) +#${prefix} texturePadding(number|function) Gap size between texture units. {{ /if }} -#${prefix} pickable(boolean) = true +#${prefix} pickable(boolean|function) = true Whether to support event pick-up, default is true. -#${prefix} childrenPickable(boolean) = true +#${prefix} childrenPickable(boolean|function) = true For group nodes, whether to support event pick-up of its child elements, default is true. If group `pickable` is off and `childrenPickable` is on, the child nodes of the group will still participate in event pick-up. -#${prefix} zIndex(number) +#${prefix} zIndex(number|function) Display level configuration. -#${prefix} visible(boolean) = true +#${prefix} visible(boolean|function) = true Whether the element is visible. -#${prefix} dx(number) +#${prefix} dx(number|function) Offset in the x direction. -#${prefix} dy(number) +#${prefix} dy(number|function) Offset in the y direction. {{ if: !${noAngle} }} -#${prefix} angle(number) +#${prefix} angle(number|function) Rotation angle. {{ /if }} -#${prefix} scaleX(number) = 1 +#${prefix} scaleX(number|function) = 1 Scale ratio in the x direction. -#${prefix} scaleY(number) = 1 +#${prefix} scaleY(number|function) = 1 Scale ratio in the y direction. -#${prefix} scaleCenter([number|string, number|string]) +#${prefix} scaleCenter([number|string, number|string]|function) Scale Center. Supported since version `1.4.0`. Can be configured with fixed coordinates, such as [100, 100], or percentage coordinates, such as ['50%', '50%'], which represents scaling around the center of the graphic element. -#${prefix} pickStrokeBuffer(number) = 0 +#${prefix} pickStrokeBuffer(number|function) = 0 Supported since version `1.7.3`, it is used to expand the picking range of strokes. 0 is the default line width, positive numbers widen the width, and negative numbers widen the width. -#${prefix} boundsPadding(number|array) +#${prefix} boundsPadding(number|array|function) Bounds padding of the graphic bounding box, default value is 0, supports two formats: - number: set uniform padding for top, right, bottom, and left diff --git a/docs/assets/option/en/graphic/fill-style.md b/docs/assets/option/en/graphic/fill-style.md index bf80217ffd..46d8d8ff3b 100644 --- a/docs/assets/option/en/graphic/fill-style.md +++ b/docs/assets/option/en/graphic/fill-style.md @@ -2,7 +2,7 @@ -#${prefix} fill(string|Object) +#${prefix} fill(string|Object|function) Fill color. Supports setting to pure color in ways like `rgb(255,255,255)`, `rgba(255,255,255,1)`, `#fff`, and also supports setting to gradient color fill. @@ -10,11 +10,11 @@ Fill color. Supports setting to pure color in ways like `rgb(255,255,255)`, `rgb {{ use: graphic-gradient }} -#${prefix} fillOpacity(number) +#${prefix} fillOpacity(number|function) Fill opacity. -#${prefix} shadowBlur(number) +#${prefix} shadowBlur(number|function) The blur size of the graphic shadow. This property is used together with shadowColor, shadowOffsetX, and shadowOffsetY to set the shadow effect of the graphic. @@ -27,19 +27,19 @@ Example: } ``` -#${prefix} shadowColor(string) +#${prefix} shadowColor(string|function) Shadow color. -#${prefix} shadowOffsetX(number) +#${prefix} shadowOffsetX(number|function) The offset distance of the shadow in the horizontal direction. -#${prefix} shadowOffsetY(number) +#${prefix} shadowOffsetY(number|function) The offset distance of the shadow in the vertical direction. -#${prefix} background(string|HtmlImageElement) +#${prefix} background(string|HtmlImageElement|function) Supported since `1.2.0` version, background configuration, which can be configured as a color string or image URL diff --git a/docs/assets/option/en/graphic/partial-stroke-style.md b/docs/assets/option/en/graphic/partial-stroke-style.md index 664c45d6b5..678d1425c6 100644 --- a/docs/assets/option/en/graphic/partial-stroke-style.md +++ b/docs/assets/option/en/graphic/partial-stroke-style.md @@ -1,14 +1,14 @@ {{ target: graphic-partial-stroke-style }} {{ if: ${markType} === 'arc' }} -#${prefix} stroke(string | Array ) +#${prefix} stroke(string | Array | function) Stroke color. Supports setting to a solid color using `'rgb (255, 255, 255)'`, `'rgba (255, 255, 255, 1)'`, `'#fff'`, etc., and also supports setting it to a gradient stroke color. Since version `1.4.0`, it supports configuration in array form. The array means: [outer arc stroke, end edge stroke, inner arc stroke, start edge stroke]. {{ else }} -#${prefix} stroke(string|Object) +#${prefix} stroke(string|Object|function) {{ /if }} Stroke color. Supports setting to a solid color using `'rgb (255, 255, 255)'`, `'rgba (255, 255, 255, 1)'`, `'#fff'`, etc., and also supports setting it to a gradient stroke color. @@ -17,11 +17,11 @@ Stroke color. Supports setting to a solid color using `'rgb (255, 255, 255)'`, ` {{ use: graphic-gradient }} -#${prefix} strokeOpacity(number) +#${prefix} strokeOpacity(number|function) Stroke opacity. -#${prefix} lineDash(number[]) +#${prefix} lineDash(number[]|function) Used to configure the dashed line mode when filling lines. It uses an array of values to specify the alternating lengths of lines and gaps that describe the pattern. @@ -35,23 +35,23 @@ lineDash: [2, 3]; lineDash: [0]; ``` -#${prefix} lineDashOffset(number) +#${prefix} lineDashOffset(number|function) An attribute to set the dashed line offset. For more details, you can refer to MDN [lineDashOffset](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset). -#${prefix} lineWidth(number) +#${prefix} lineWidth(number|function) Line width. -#${prefix} lineCap(string) +#${prefix} lineCap(string|function) An attribute that specifies how to draw the end of each line segment. There are 3 possible values: `'butt'`, `'round'`, and `'square'`. The default value is butt. -#${prefix} lineJoin(string) +#${prefix} lineJoin(string|function) An attribute used to set how the two connected parts (segments, arcs, curves) of non-zero length are connected together (the deformed part whose specified end and control points are in the same position with a length of 0 will be ignored). This attribute has 3 values: `'round'`, `'bevel'`, and `'miter'`. The default value is `'miter'`. -#${prefix} miterLimit(number) +#${prefix} miterLimit(number|function) An attribute that sets the limit ratio of the beveled surface. When the attribute value is obtained, the current value (the default value is 10.0) will be returned. When the attribute is set, 0, negative numbers, Infinity, and NaN will be ignored; all others will be assigned a new value. diff --git a/docs/assets/option/en/graphic/text-font.md b/docs/assets/option/en/graphic/text-font.md index f171e3149f..f1ba0b0788 100644 --- a/docs/assets/option/en/graphic/text-font.md +++ b/docs/assets/option/en/graphic/text-font.md @@ -2,19 +2,19 @@ -#${prefix} text(string|number|Array) +#${prefix} text(string|number|Array|function) Text content. If an array is passed, it will be displayed with line breaks. -#${prefix} fontSize(number) +#${prefix} fontSize(number|function) Font size. -#${prefix} fontFamily(string) +#${prefix} fontFamily(string|function) Font family. -#${prefix} fontWeight(string|number) +#${prefix} fontWeight(string|number|function) The weight of the text font. @@ -26,7 +26,7 @@ Options: - `'lighter'` - `100 | 200 | 300 | 400`... -#${prefix} fontStyle(string) = 'normal' +#${prefix} fontStyle(string|function) = 'normal' The style of the text font. @@ -36,33 +36,33 @@ Options: - `'italic'` - `'oblique'` -#${prefix} fontVariant(string|number) +#${prefix} fontVariant(string|number|function) Same as CSS [font-variant](https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant). -#${prefix} lineHeight(number) +#${prefix} lineHeight(number|function) Line height. -#${prefix} textAlign(string) +#${prefix} textAlign(string|function) Horizontal alignment, values: `'left'`, `'center'`, `'right'`, `'start'`, `'end'`. If it is `'left'`/`'start'`, the leftmost part of the text is at the `x` value. If it is `'right'`/`'end'`, the rightmost part of the text is at the `x` value. -#${prefix} textBaseline(string) +#${prefix} textBaseline(string|function) Vertical alignment, values: `'top'`, `'middle'`, `'bottom'`, `'alphabetic'`. -#${prefix} maxLineWidth(number) +#${prefix} maxLineWidth(number|function) The maximum length of the text. If `ellipsis` is not empty, it will be automatically truncated. -#${prefix} ellipsis(boolean|string) = '...' +#${prefix} ellipsis(boolean|string|function) = '...' Effective only when `maxLineWidth` is configured. If text exceeds, should it be automatically abbreviated? If the value is true, the default ellipsis is '...', or you can customize the ellipsis, like `ellipsis: 'etc.'`. -#${prefix} suffixPosition(string) = 'end' +#${prefix} suffixPosition(string|function) = 'end' Supported since `1.7.3` version, used to configure the position of text omission, the default is to omit the tail. @@ -70,19 +70,19 @@ Supported since `1.7.3` version, used to configure the position of text omission - 'middle' omitted from the middle of the text - 'end' omit the end of the text -#${prefix} underline(boolean) +#${prefix} underline(boolean|function) Enable underline. -#${prefix} lineThrough(boolean) +#${prefix} lineThrough(boolean|function) Enable strikethrough. -#${prefix} direction('horizontal'|'vertical') = 'horizontal' +#${prefix} direction('horizontal'|'vertical'|function) = 'horizontal' The layout direction of the text. If you need the text to be arranged vertically, you can configure it to 'vertical'. -#${prefix} wordBreak(string) = 'break-word' +#${prefix} wordBreak(string|function) = 'break-word' Word break mode. Options: @@ -91,6 +91,6 @@ Options: - "break-word": Does not allow breaking words in CJK (Chinese/Japanese/Korean) text, only breaks at half-width spaces or hyphens. - "keep-all": Does not break words in CJK (Chinese/Japanese/Korean) text. Non-CJK text words are not broken. (Supported since version 1.12.8) -#${prefix} keepDirIn3d(boolean) +#${prefix} keepDirIn3d(boolean|function) Whether to always maintain the direction facing the window in 3d mode (if set to false, it will rotate with the viewpoint, if set to true, the direction will always face the window) diff --git a/docs/assets/option/en/mark/area.md b/docs/assets/option/en/mark/area.md index bdfbb01201..c7ec854774 100644 --- a/docs/assets/option/en/mark/area.md +++ b/docs/assets/option/en/mark/area.md @@ -2,7 +2,7 @@ -#${prefix} curveType(string) +#${prefix} curveType(string|function) Curve interpolation type. @@ -20,7 +20,7 @@ Available options: - `catmullRom` - `catmullRomClosed` -#${prefix} orient(string) = `horizontal` +#${prefix} orient(string|function) = `horizontal` Available options: diff --git a/docs/assets/option/en/mark/line.md b/docs/assets/option/en/mark/line.md index 79d9ca0636..47e2e2ce68 100644 --- a/docs/assets/option/en/mark/line.md +++ b/docs/assets/option/en/mark/line.md @@ -2,7 +2,7 @@ -#${prefix} curveType(string) +#${prefix} curveType(string|function) Curve interpolation type. @@ -20,15 +20,15 @@ Available options: - `catmullRom` - `catmullRomClosed` -#${prefix} defined(boolean) +#${prefix} defined(boolean|function) Indicates if it is a valid number. -#${prefix} enableSegments(boolean) +#${prefix} enableSegments(boolean|function) A flag to inform Sirius if it should execute the getLineSegmentConfigs method. -#${prefix} strokeBoundsBuffer(number) +#${prefix} strokeBoundsBuffer(number|function) The bounded buffer for stroke. diff --git a/docs/assets/option/en/mark/symbol.md b/docs/assets/option/en/mark/symbol.md index e0fe2ff8ac..97298f9c58 100644 --- a/docs/assets/option/en/mark/symbol.md +++ b/docs/assets/option/en/mark/symbol.md @@ -2,19 +2,19 @@ -#${prefix} dx(number) +#${prefix} dx(number|function) Offset in the x direction. -#${prefix} dy(number) +#${prefix} dy(number|function) Offset in the y direction. -#${prefix} size(number) +#${prefix} size(number|function) Size. -#${prefix} shape(string) +#${prefix} shape(string|function) Shape. @@ -39,4 +39,4 @@ Optional values: - `'wye'` - `'rect'` -If you need to implement a custom shape, you can achieve this by passing an `svg` path string to customize the shape, for example: `shape: 'M-0.5,-0.5L0.5,0.5L-0.5,0.5C'` \ No newline at end of file +If you need to implement a custom shape, you can achieve this by passing an `svg` path string to customize the shape, for example: `shape: 'M-0.5,-0.5L0.5,0.5L-0.5,0.5C'` diff --git a/docs/assets/option/en/mark/text.md b/docs/assets/option/en/mark/text.md index da3534cf2d..e00dc22a85 100644 --- a/docs/assets/option/en/mark/text.md +++ b/docs/assets/option/en/mark/text.md @@ -2,19 +2,19 @@ -#${prefix} text(string|number|string[]) +#${prefix} text(string|number|string[]|function) Text. -#${prefix} dx(number) +#${prefix} dx(number|function) X-axis offset. -#${prefix} dy(number) +#${prefix} dy(number|function) Y-axis offset. -#${prefix} textAlgin(string) +#${prefix} textAlgin(string|function) Text alignment. @@ -24,7 +24,7 @@ Optional values: - `'right'`: Align right - `'center'`: Align center -#${prefix} textBaseline(string) +#${prefix} textBaseline(string|function) Text baseline. @@ -34,11 +34,11 @@ Optional values: - `'bottom'` - `'middle'` -#${prefix} fontFamily(string) +#${prefix} fontFamily(string|function) Text font. -#${prefix} fontWeight(string|number) +#${prefix} fontWeight(string|number|function) Font weight of the text. @@ -50,7 +50,7 @@ Optional: - `'lighter'` - `100 | 200 | 300 | 400`... -#${prefix} fontStyle(string) +#${prefix} fontStyle(string|function) Style of text font. @@ -60,15 +60,15 @@ Optional: - `'italic'` - `'oblique'` -#${prefix} limit(number) +#${prefix} limit(number|function) Text length limit. -#${prefix} ellipsis(string) +#${prefix} ellipsis(string|function) Text truncation method. -#${prefix} suffixPosition(string) = 'end' +#${prefix} suffixPosition(string|function) = 'end' Supported since `1.7.3` version, used to configure the position of text omission, the default is to omit the tail. diff --git a/docs/assets/option/zh/graphic/attribute.md b/docs/assets/option/zh/graphic/attribute.md index 65632ba09d..732810552a 100644 --- a/docs/assets/option/zh/graphic/attribute.md +++ b/docs/assets/option/zh/graphic/attribute.md @@ -15,17 +15,17 @@ ) }} {{ /if }} -#${prefix} opacity(number) +#${prefix} opacity(number|function) 整体透明度设置。 -#${prefix} cursor(string) +#${prefix} cursor(string|function) 鼠标悬浮时在图形元素上时鼠标的样式是什么。同 CSS 的 cursor。 {{ if: !${noTexture} }} -#${prefix} texture(string) +#${prefix} texture(string|function) 纹理类型配置,支持:`'circle' | 'diamond' | 'rect' | 'vertical-line' | 'horizontal-line' | 'bias-lr' | 'bias-rl' | 'grid'`。 @@ -40,68 +40,70 @@ style: { } ``` -#${prefix} textureColor(string) +#${prefix} textureColor(string|function) 纹理颜色。 -#${prefix} textureSize(number) +#${prefix} textureSize(number|function) 纹理单元的大小。 -#${prefix} texturePadding(number) +#${prefix} texturePadding(number|function) 纹理单元间的空隙大小。 {{ /if }} -#${prefix} pickable(boolean) = true +#${prefix} pickable(boolean|function) = true 是否支持事件拾取,默认为 true。 -#${prefix} childrenPickable(boolean) = true +#${prefix} childrenPickable(boolean|function) = true 对于 group 节点,是否支持其子元素的事件拾取,默认为 true。如果 group `pickable` 关闭,`childrenPickable` 开启,那么 group 的子节点仍参与事件拾取。 -#${prefix} zIndex(number) +#${prefix} zIndex(number|function) 显示层级配置。 -#${prefix} visible(boolean) = true +#${prefix} visible(boolean|function) = true 元素是否可见。 -#${prefix} dx(number) +#${prefix} dx(number|function) x 方向的偏移。 -#${prefix} dy(number) +#${prefix} dy(number|function) y 方向的偏移。 {{ if: !${noAngle} }} -#${prefix} angle(number) +#${prefix} angle(number|function) 旋转角度。 {{ /if }} -#${prefix} scaleX(number) = 1 +#${prefix} scaleX(number|function) = 1 + x 方向缩放比例。 -#${prefix} scaleY(number) = 1 +#${prefix} scaleY(number|function) = 1 + y 方向缩放比例。 -#${prefix} scaleCenter([number|string, number|string]) +#${prefix} scaleCenter([number|string, number|string]|function) 缩放中心。自 `1.4.0` 版本以后支持。 可以配置固定坐标,例如 [100, 100];或者百分比坐标,例如 ['50%', '50%'],代表以图元中心为缩放中心。 -#${prefix} pickStrokeBuffer(number) = 0 +#${prefix} pickStrokeBuffer(number|function) = 0 自 `1.7.3` 版本开始支持,用于扩展描边的拾取范围,为 0 就是默认线宽,正数就加宽,负数就减宽。 -#${prefix} boundsPadding(number|array) +#${prefix} boundsPadding(number|array|function) 图形包围盒的边距,默认值为 0,支持两种格式: @@ -109,9 +111,11 @@ y 方向缩放比例。 - array: 边距数组,格式为`[top, right, bottom, left]` ,分别设置四个方向的边距 #${prefix} html(object) + 自 `1.10.0` 版本开始支持,用于配置图元的 html 浮层。 ##${prefix} dom(string|HTMLElement) + dom 字符串或节点。 {{ use: graphic-dom-attributes( @@ -120,9 +124,11 @@ dom 字符串或节点。 {{ /if }} #${prefix} react(object) + 自 `1.11.0` 版本开始支持,用于配置图元的 react 浮层。 ##${prefix} element(Object) + React 元素 {{ use: graphic-dom-attributes( diff --git a/docs/assets/option/zh/graphic/fill-style.md b/docs/assets/option/zh/graphic/fill-style.md index 439dbd4a2d..7d7c9c91cc 100644 --- a/docs/assets/option/zh/graphic/fill-style.md +++ b/docs/assets/option/zh/graphic/fill-style.md @@ -2,7 +2,7 @@ -#${prefix} fill(string|Object) +#${prefix} fill(string|Object|function) 填充颜色。支持使用 `rgb(255,255,255)`,`rgba(255,255,255,1)`,`#fff` 等方式设置为纯色,也支持设置为渐变色填充。 @@ -10,11 +10,11 @@ {{ use: graphic-gradient }} -#${prefix} fillOpacity(number) +#${prefix} fillOpacity(number|function) 填充透明度。 -#${prefix} shadowBlur(number) +#${prefix} shadowBlur(number|function) 图形阴影的模糊大小。该属性配合 shadowColor,shadowOffsetX, shadowOffsetY 一起设置图形的阴影效果。 @@ -27,19 +27,20 @@ } ``` -#${prefix} shadowColor(string) +#${prefix} shadowColor(string|function) 阴影颜色。 -#${prefix} shadowOffsetX(number) +#${prefix} shadowOffsetX(number|function) 阴影水平方向上的偏移距离。 -#${prefix} shadowOffsetY(number) +#${prefix} shadowOffsetY(number|function) 阴影垂直方向上的偏移距离。 -#${prefix} background(string|HtmlImageElement) +#${prefix} background(string|HtmlImageElement|function) + 自`1.2.0`版本开始支持,背景配置, 可以配置为颜色字符串或者图片地址 > 注意配置为图片地址时,透明度受 `fillOpacity` 影响,请务必配置 `fillOpacity` diff --git a/docs/assets/option/zh/graphic/partial-stroke-style.md b/docs/assets/option/zh/graphic/partial-stroke-style.md index abb305bbe6..3b6bf02c55 100644 --- a/docs/assets/option/zh/graphic/partial-stroke-style.md +++ b/docs/assets/option/zh/graphic/partial-stroke-style.md @@ -1,14 +1,15 @@ {{ target: graphic-partial-stroke-style }} {{ if: ${markType} === 'arc' }} -#${prefix} stroke(string | Array ) -圆弧描边。支持使用 `'rgb(255,255,255)'`,`'rgba(255,255,255,1)'`,`'#fff'` 等方式设置为纯色,也支持设置为渐变色描边。 +#${prefix} stroke(string | Array | function) + +圆弧描边。支持使用 `'rgb(255,255,255)'`,`'rgba(255,255,255,1)'`,`'#fff'` 等方式设置为纯色,也支持设置为渐变色描边。 在 `1.4.0` 版本后,支持配置为数组形式。数组含义为:[外弧描边,终止边描边,内弧描边,起始边描边]。 {{ else }} -#${prefix} stroke(string|Object) +#${prefix} stroke(string|Object|function) 描边颜色。支持使用 `'rgb(255,255,255)'`,`'rgba(255,255,255,1)'`,`'#fff'` 等方式设置为纯色,也支持设置为渐变色描边。 @@ -18,11 +19,11 @@ {{ use: graphic-gradient }} -#${prefix} strokeOpacity(number) +#${prefix} strokeOpacity(number|function) 描边透明度。 -#${prefix} lineDash(number[]) +#${prefix} lineDash(number[]|function) 用于填充线时配置虚线模式。它使用一组值来指定描述模式的线和间隙的交替长度。 @@ -36,23 +37,23 @@ lineDash: [2, 3]; lineDash: [0]; ``` -#${prefix} lineDashOffset(number) +#${prefix} lineDashOffset(number|function) 设置虚线偏移量的属性。更多详情可以参考 MDN [lineDashOffset](https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/lineDashOffset)。 -#${prefix} lineWidth(number) +#${prefix} lineWidth(number|function) 线宽。 -#${prefix} lineCap(string) +#${prefix} lineCap(string|function) 指定如何绘制每一条线段末端的属性。有 3 个可能的值,分别是:`'butt'`, `'round'` and `'square'`。默认值是 butt。 -#${prefix} lineJoin(string) +#${prefix} lineJoin(string|function) 用来设置 2 个长度不为 0 的相连部分(线段、圆弧、曲线)如何连接在一起的属性(长度为 0 的变形部分,其指定的末端和控制点在同一位置,会被忽略)。此属性有 3 个值: `'round'`, `'bevel'` and `'miter'`。默认值是 `'miter'`。 -#${prefix} miterLimit(number) +#${prefix} miterLimit(number|function) 设置斜接面限制比例的属性。当获取属性值时,会返回当前的值(默认值是 10.0 )。当给属性赋值时,0、负数、 Infinity 和 NaN 都会被忽略;除此之外都会被赋予一个新值。 diff --git a/docs/assets/option/zh/graphic/text-font.md b/docs/assets/option/zh/graphic/text-font.md index d9dc10b0b8..d60c111578 100644 --- a/docs/assets/option/zh/graphic/text-font.md +++ b/docs/assets/option/zh/graphic/text-font.md @@ -1,14 +1,14 @@ {{ target: graphic-text-font }} -#${prefix} fontSize(number) +#${prefix} fontSize(number|function) 字号。 -#${prefix} fontFamily(string) +#${prefix} fontFamily(string|function) 字体。 -#${prefix} fontWeight(string|number) +#${prefix} fontWeight(string|number|function) 文字字体的粗细。 @@ -20,7 +20,7 @@ - `'lighter'` - `100 | 200 | 300 | 400`... -#${prefix} fontStyle(string) = 'normal' +#${prefix} fontStyle(string|function) = 'normal' 文字字体的风格。 @@ -30,33 +30,33 @@ - `'italic'` - `'oblique'` -#${prefix} fontVariant(string|number) +#${prefix} fontVariant(string|number|function) 同 css [font-variant](https://developer.mozilla.org/zh-CN/docs/Web/CSS/font-variant)。 -#${prefix} lineHeight(number) +#${prefix} lineHeight(number|function) 行高。 -#${prefix} textAlign(string) +#${prefix} textAlign(string|function) 水平对齐方式,取值:`'left'`, `'center'`, `'right'`, `'start'`, `'end'`。 如果为 `'left'`/`'start'`,表示文本最左端在 `x` 值上。如果为 `'right'`/`'end'`,表示文本最右端在 `x` 值上。 -#${prefix} textBaseline(string) +#${prefix} textBaseline(string|function) 垂直对齐方式,取值:`'top'`, `'middle'`, `'bottom'`, `'alphabetic'`。 -#${prefix} maxLineWidth(number) +#${prefix} maxLineWidth(number|function) 文字最大的长度,如果 `ellipsis` 非空,超出则会自动省略。 -#${prefix} ellipsis(boolean|string) = '...' +#${prefix} ellipsis(boolean|string|function) = '...' 仅在配置了 `maxLineWidth` 时生效,文本超出是否自动省略,如果值为 true,则默认省略符为 '...',也可以自定义省略符,直接 `ellipsis: 'etc.'`。 -#${prefix} suffixPosition(string) = 'end' +#${prefix} suffixPosition(string|function) = 'end' 自 `1.7.3` 版本开始支持,用于配置文本省略的位置,默认尾部省略。 @@ -64,19 +64,19 @@ - 'middle' 文本中间省略 - 'end' 文本尾部省略 -#${prefix} underline(boolean) +#${prefix} underline(boolean|function) 是否开启下划线。 -#${prefix} lineThrough(boolean) +#${prefix} lineThrough(boolean|function) 是否开启删除线。 -#${prefix} direction('horizontal'|'vertical') = 'horizontal' +#${prefix} direction('horizontal'|'vertical'|function) = 'horizontal' 文本的排布方向,如果需要文本纵向排布,可以配置为 'vertical'。 -#${prefix} wordBreak(string) = 'break-word' +#${prefix} wordBreak(string|function) = 'break-word' 折行方式。 @@ -86,6 +86,6 @@ - "break-word": 不允许 CJK(中文/日文/韩文)文本中的单词换行,只能在半角空格或连字符处换行。 - "keep-all": CJK(中文/日文/韩文)文本不断行。非 CJK 文本单词不断行。(从 1.12.8 版本开始支持) -#${prefix} keepDirIn3d(boolean) +#${prefix} keepDirIn3d(boolean|function) 是否在 3d 模式中始终保持方向朝向窗口(配置为 false 则会随着视角旋转而旋转,配置为 true,那么方向始终朝向窗口) diff --git a/docs/assets/option/zh/mark/area.md b/docs/assets/option/zh/mark/area.md index 053ec583db..f21bc7a2f9 100644 --- a/docs/assets/option/zh/mark/area.md +++ b/docs/assets/option/zh/mark/area.md @@ -2,7 +2,7 @@ -#${prefix} curveType(string) +#${prefix} curveType(string|function) 曲线插值类型。 @@ -20,7 +20,7 @@ - `catmullRom` - `catmullRomClosed` -#${prefix} orient(string) = `horizontal` +#${prefix} orient(string|function) = `horizontal` 可选值: diff --git a/docs/assets/option/zh/mark/line.md b/docs/assets/option/zh/mark/line.md index 883fc8ec72..d0e1b990ec 100644 --- a/docs/assets/option/zh/mark/line.md +++ b/docs/assets/option/zh/mark/line.md @@ -2,7 +2,7 @@ -#${prefix} curveType(string) +#${prefix} curveType(string|function) 曲线插值类型。 @@ -20,15 +20,15 @@ - `catmullRom` - `catmullRomClosed` -#${prefix} defined(boolean) +#${prefix} defined(boolean|function) 是否是有效数字。 -#${prefix} enableSegments(boolean) +#${prefix} enableSegments(boolean|function) 一个标志位,用于通知 sirius 是否执行 getLineSegmentConfigs 方法。 -#${prefix} strokeBoundsBuffer(number) +#${prefix} strokeBoundsBuffer(number|function) stroke 的有界缓冲区。 diff --git a/docs/assets/option/zh/mark/symbol.md b/docs/assets/option/zh/mark/symbol.md index d00e6cc860..4eee755387 100644 --- a/docs/assets/option/zh/mark/symbol.md +++ b/docs/assets/option/zh/mark/symbol.md @@ -2,19 +2,19 @@ -#${prefix} dx(number) +#${prefix} dx(number|function) x 方向偏移。 -#${prefix} dy(number) +#${prefix} dy(number|function) y 方向偏移。 -#${prefix} size(number) +#${prefix} size(number|function) 大小。 -#${prefix} shape(string) +#${prefix} shape(string|function) 形状。 diff --git a/docs/assets/option/zh/mark/text.md b/docs/assets/option/zh/mark/text.md index f05995620b..cdaa0ab39e 100644 --- a/docs/assets/option/zh/mark/text.md +++ b/docs/assets/option/zh/mark/text.md @@ -2,19 +2,19 @@ -#${prefix} text(string|number|string[]) +#${prefix} text(string|number|string[]|function) 文本。 -#${prefix} dx(number) +#${prefix} dx(number|function) x 方向偏移。 -#${prefix} dy(number) +#${prefix} dy(number|function) y 方向偏移。 -#${prefix} textAlgin(string) +#${prefix} textAlgin(string|function) 文字对齐方式。 @@ -24,7 +24,7 @@ y 方向偏移。 - `'right'`: 右对齐 - `'center'`: 居中对齐 -#${prefix} textBaseline(string) +#${prefix} textBaseline(string|function) 文字基线。 @@ -34,11 +34,11 @@ y 方向偏移。 - `'bottom'` - `'middle'` -#${prefix} fontFamily(string) +#${prefix} fontFamily(string|function) 文字字体。 -#${prefix} fontWeight(string|number) +#${prefix} fontWeight(string|number|function) 文字字体的粗细。 @@ -50,7 +50,7 @@ y 方向偏移。 - `'lighter'` - `100 | 200 | 300 | 400`... -#${prefix} fontStyle(string) +#${prefix} fontStyle(string|function) 文字字体的风格。 @@ -60,15 +60,15 @@ y 方向偏移。 - `'italic'` - `'oblique'` -#${prefix} limit(number) +#${prefix} limit(number|function) 文字长度限制。 -#${prefix} ellipsis(string) +#${prefix} ellipsis(string|function) 文字省略方式。 -#${prefix} suffixPosition(string) = 'end' +#${prefix} suffixPosition(string|function) = 'end' 自 `1.7.3` 版本开始支持,用于配置文本省略的位置,默认尾部省略。