类名 ThemeStyle

# new ThemeStyle(options)

参数:

名称 类型 默认值 描述
options Object

可选参数。

fill boolean true

是否填充,不需要填充则设置为 false。如果 fill 与 stroke 同时为 false,将按 fill 与 stroke 的默认值渲染图层。

fillColor string '#000000'

十六进制填充颜色。

fillOpacity number 1

填充不透明度。取值范围[0, 1]。

stroke boolean false

是否描边,不需要描边则设置为false。如果 fill 与 stroke 同时为 false,将按 fill 与 stroke 的默认值渲染图层。

strokeColor string '#000000'

十六进制描边颜色。

strokeOpacity number 1

描边的不透明度。取值范围[0, 1]。

strokeWidth number 1

线宽度/描边宽度。

strokeLinecap string 'butt'

线帽样式。strokeLinecap 有三种类型 “butt", "round", "square"。

strokeLineJoin string 'iter'

线段连接样式。strokeLineJoin 有三种类型 “miter", "round", "bevel"。

strokeDashstyle string 'solid'

虚线类型。strokeDashstyle 有八种类型 “dot",“dash",“dashdot",“longdash",“longdashdot",“solid", "dashed", "dotted"。solid 表示实线。

pointRadius number 6

点半径,单位为像素。

shadowBlur number 0

阴影模糊度,(大于 0 有效;)。注:请将 shadowColor 属性与 shadowBlur 属性一起使用,来创建阴影。

shadowColor string '#000000'

阴影颜色。注:请将 shadowColor 属性与 shadowBlur 属性一起使用,来创建阴影。

shadowOffsetX number 0

阴影 X 方向偏移值。

shadowOffsetY number 0

阴影 Y 方向偏移值。

label string

专题要素附加文本标签内容。

fontColor string

附加文本字体颜色。

fontSize number 12

附加文本字体大小,单位是像素。

fontStyle string 'normal'

附加文本字体样式。可设值:"normal", "italic", "oblique"。

fontVariant string 'normal'

附加文本字体变体。可设值:"normal", "small-caps"。

fontWeight string 'normal'

附加文本字体粗细。可设值:"normal", "bold", "bolder", "lighter"。

fontFamily string 'arial,sans-serif'

附加文本字体系列。fontFamily 值是字体族名称或/及类族名称的一个优先表,每个值逗号分割, 浏览器会使用它可识别的第一个可以使用具体的字体名称("times"、"courier"、"arial")或字体系列名称 ("serif"、"sans-serif"、"cursive"、"fantasy"、"monospace")。

labelPosition string 'top'

附加文本位置, 可以是 'inside', 'left', 'right', 'top', 'bottom'。

labelAlign string 'center'

附加文本水平对齐。可以是 'left', 'right', 'center'。

labelBaseline string 'middle'

附加文本垂直对齐。 可以是 'top', 'bottom', 'middle' 。

labelXOffset number 0

附加文本在x轴方向的偏移量。

labelYOffset number 0

附加文本在y轴方向的偏移量。

查看源代码 document/theme/ThemeStyle.js, line 5

成员变量

boolean

# fill Optional

是否填充,不需要填充则设置为 false。如果 fill 与 stroke 同时为 false,将按 fill 与 stroke 的默认值渲染图层。

Default Value:
  • true

查看源代码 document/theme/ThemeStyle.js, line 42

string

# fillColor Optional

十六进制填充颜色。

Default Value:
  • "#000000"

查看源代码 document/theme/ThemeStyle.js, line 47

number

# fillOpacity Optional

填充不透明度。取值范围[0, 1]。

Default Value:
  • 1

查看源代码 document/theme/ThemeStyle.js, line 52

string

# fontColor Optional

附加文本字体颜色。

查看源代码 document/theme/ThemeStyle.js, line 128

string

# fontFamily Optional

附加文本字体系列。fontFamily 值是字体族名称或/及类族名称的一个优先表,每个值逗号分割,浏览器会使用它可识别的第一个 可以使用具体的字体名称("times"、"courier"、"arial")或字体系列名称("serif"、"sans-serif"、"cursive"、"fantasy"、"monospace")。

Default Value:
  • "arial,sans-serif"

查看源代码 document/theme/ThemeStyle.js, line 153

number

# fontSize Optional

附加文本字体大小,单位是像素。

Default Value:
  • 12

查看源代码 document/theme/ThemeStyle.js, line 133

string

# fontStyle Optional

附加文本字体样式。可设值:"normal", "italic", "oblique"。

Default Value:
  • "normal"

查看源代码 document/theme/ThemeStyle.js, line 138

string

# fontVariant Optional

附加文本字体变体。可设值:"normal", "small-caps"。

Default Value:
  • "normal"

查看源代码 document/theme/ThemeStyle.js, line 143

string

# fontWeight Optional

附加文本字体粗细。可设值:"normal", "bold", "bolder", "lighter"。

Default Value:
  • "normal"

查看源代码 document/theme/ThemeStyle.js, line 148

string

# label Optional

专题要素附加文本标签内容。

查看源代码 document/theme/ThemeStyle.js, line 118

string

# labelAlign Optional

附加文本水平对齐。可以是 'left', 'right', 'center'。

Default Value:
  • 'center'

查看源代码 document/theme/ThemeStyle.js, line 164

string

# labelBaseline Optional

附加文本垂直对齐。 可以是 'top', 'bottom', 'middle'。

Default Value:
  • 'middle'

查看源代码 document/theme/ThemeStyle.js, line 169

string

# labelPosition Optional

附加文本位置, 可以是 'inside', 'left', 'right', 'top', 'bottom'。

Default Value:
  • 'top'

查看源代码 document/theme/ThemeStyle.js, line 159

boolean

# labelRect Optional

是否显示文本标签矩形背景。

查看源代码 document/theme/ThemeStyle.js, line 123

number

# labelXOffset Optional

附加文本在 X 轴方向的偏移量。

查看源代码 document/theme/ThemeStyle.js, line 174

number

# labelYOffset Optional

附加文本在 Y 轴方向的偏移量。

查看源代码 document/theme/ThemeStyle.js, line 179

number

# pointRadius Optional

点半径。单位为像素。

Default Value:
  • 6

查看源代码 document/theme/ThemeStyle.js, line 93

number

# shadowBlur Optional

阴影模糊度,(大于 0 有效)。注:请将 shadowColor 属性与 shadowBlur 属性一起使用,来创建阴影。

查看源代码 document/theme/ThemeStyle.js, line 98

string

# shadowColor Optional

阴影颜色。注:请将 shadowColor 属性与 shadowBlur 属性一起使用,来创建阴影。

Default Value:
  • '#000000'

查看源代码 document/theme/ThemeStyle.js, line 103

number

# shadowOffsetX Optional

阴影 X 方向偏移值。

查看源代码 document/theme/ThemeStyle.js, line 108

number

# shadowOffsetY

Y 方向偏移值。

查看源代码 document/theme/ThemeStyle.js, line 113

boolean

# stroke Optional

是否描边,不需要描边则设置为false。如果 fill 与 stroke 同时为 false,将按 fill 与 stroke 的默认值渲染图层。

查看源代码 document/theme/ThemeStyle.js, line 57

string

# strokeColor Optional

十六进制描边颜色。

Default Value:
  • "#000000"

查看源代码 document/theme/ThemeStyle.js, line 62

string

# strokeDashstyle Optional

虚线类型; strokeDashstyle 有八种类型 “dot",“dash",“dashdot",“longdash",“longdashdot",“solid", "dashed", "dotted"; solid 表示实线。

Default Value:
  • "solid"

查看源代码 document/theme/ThemeStyle.js, line 87

string

# strokeLinecap Optional

线帽样式;strokeLinecap 有三种类型 “butt", "round", "square" 。

Default Value:
  • "butt"

查看源代码 document/theme/ThemeStyle.js, line 77

string

# strokeLineJoin Optional

线段连接样式;strokeLineJoin 有三种类型 “miter", "round", "bevel"。

Default Value:
  • "miter"

查看源代码 document/theme/ThemeStyle.js, line 82

number

# strokeOpacity Optional

描边的不透明度。取值范围[0, 1]。

Default Value:
  • 1

查看源代码 document/theme/ThemeStyle.js, line 67

number

# strokeWidth Optional

线宽度/描边宽度。

Default Value:
  • 1

查看源代码 document/theme/ThemeStyle.js, line 72

构造函数
成员变量
方法
事件