VSeed, an elegant data composer, transforming complexity into simplicity.
!!!###!!!title=Richtext and dom extension——VisActor/VChart tutorial documents!!!###!!!
Rich Text and DOM Extensions
Rich Text
Starting from v1.10.0, VChart supports rich text capabilities on commonly used component texts, including:
Set different text styles for specific paragraphs of the text, such as font, color, font size, etc.
Mix images in text
Set overall style for text, such as text alignment, text direction, text wrapping, etc.
Currently, the components that support rich text configuration are:
Label component
Axis component: axis labels, axis titles
Discrete legend component: legend text, legend title
Annotation component: annotation text
Indicator card component
Custom graphic element: rich text element
Canvas tooltip component: title and content lines
Capabilities supported by rich text
VChart provides the following configuration items for rich text as a whole:
Basic text style:、fontSize、fontFamily、fontStyle、fontWeight
Text color: fill、fillOpacity
Text stroke: stroke、lineWidth、strokeOpacity
Text wrapping and clipping: ellipsis、wordBreak、singleLine、forceBreakLine
Size of richtext: width、height、maxWidth、maxHeight
Alignment of richtext: textAlign、textBaseline、verticalDirection
Rotation and scaling:angle、scaleX、scaleY
Text paragraph layout direction: layoutDirection
Text paragraph configuration: textConfig
For example:
Text paragraph configuration.
Rich text is composed of text paragraphs, which support two types: text and images.
Text
Text supports the following configurations:
Text content:text
Text style: fontSize、fontFamily、fontStyle、fontWeight
Text color: fill、fillOpacity
Text stroke: stroke、lineWidth、strokeOpacity
Text decoration: textDecoration、script 、underline、lineThrough