ipecharts.option.textstyle module#

class ipecharts.option.textstyle.TextStyle(**kwargs: Any)[source]#

Bases: BaseWidget

Warning:

Autogenerated class

Global font style.

color Any(None)#

text color.

fontStyle Unicode(None)#

font style.

Options are:

  • ‘normal’

  • ‘italic’

  • ‘oblique’

fontWeight Union(None)#

font thick weight.

Options are:

  • ‘normal’

  • ‘bold’

  • ‘bolder’

  • ‘lighter’

  • 100 | 200 | 300 | 400…

fontFamily Unicode(None)#

font family.

Can also be ‘serif’ , ‘monospace’, …

fontSize Float(None)#

font size.

lineHeight Float(None)#

Line height of the text fragment.

If lineHeight is not set in rich, lineHeight in parent level will be used. For example:

``` {

lineHeight: 56, rich: {

a: {

// lineHeight is not set, then it will be 56

}

}

}

```

width Float(None)#

Width of text block.

height Float(None)#

Height of text block.

textBorderColor Any(None)#

Stroke color of the text.

textBorderWidth Float(None)#

Stroke line width of the text.

textBorderType Union(None)#

Stroke line type of the text.

Possible values are:

  • ‘solid’

  • ‘dashed’

  • ‘dotted’

Since v5.0.0, it can also be a number or a number array to specify the [dash array](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray) of the line. With textBorderDashOffset , we can make the line style more flexible.

For example:

``` {

textBorderType: [5, 10],

textBorderDashOffset: 5 }

```

textBorderDashOffset Float(None)#

> Since v5.0.0

To set the line dash offset. With textBorderType , we can make the line style more flexible.

Refer to MDN [lineDashOffset](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineDashOffset) for more details.

textShadowColor Any(None)#

Shadow color of the text itself.

textShadowBlur Float(None)#

Shadow blue of the text itself.

textShadowOffsetX Float(None)#

Shadow X offset of the text itself.

textShadowOffsetY Float(None)#

Shadow Y offset of the text itself.

overflow Unicode(None)#

Determine how to display the text when it’s overflow. Available when width is set.

  • ‘truncate’ Truncate the text and trailing with ellipsis.

  • ‘break’ Break by word

  • ‘breakAll’ Break by character.

ellipsis Unicode(None)#

Ellipsis to be displayed when overflow is set to truncate.

  • ‘truncate’ Truncate the overflow lines.