ipecharts.option.title module#
- class ipecharts.option.title.Title(**kwargs: Any)[source]#
Bases:
BaseWidget- Warning:
Autogenerated class
Title component, including main title and subtitle.
In ECharts 2.x, a single instance of ECharts could contains one title component at most. However, in ECharts 3, there could be one or more than one title components. It is more useful when multiple diagrams in one instance all need titles.
Here are some instances of different animation easing functions, among which every instance has a title component:
- id Unicode(None)#
Component ID, not specified by default. If specified, it can be used to refer the component in option or API.
- show Bool(None)#
Set this to false to prevent the title from showing
- text Unicode(None)#
The main title text, supporting for ` ` for newlines.
- link Unicode(None)#
The hyper link of main title text.
- target Unicode(None)#
Open the hyper link of main title in specified tab.
options:
‘self’ opening it in current tab
‘blank’ opening it in a new tab
- textStyle Dict()#
- subtext Unicode(None)#
Subtitle text, supporting for ` ` for newlines.
- sublink Unicode(None)#
The hyper link of subtitle text.
- subtarget Unicode(None)#
Open the hyper link of subtitle in specified tab, options:
‘self’ opening it in current tab
‘blank’ opening it in a new tab
- subtextStyle Dict()#
- textAlign Unicode(None)#
The horizontal align of the component (including “text” and “subtext”).
Optional values: ‘auto’, ‘left’, ‘right’, ‘center’.
- textVerticalAlign Unicode(None)#
The vertical align of the component (including “text” and “subtext”).
Optional values: ‘auto’, ‘top’, ‘bottom’, ‘middle’.
- triggerEvent Bool(None)#
Set this to true to enable triggering events
- padding Union(None)#
title space around content. The unit is px. Default values for each position are 5. And they can be set to different values with left, right, top, and bottom.
Examples:
``` // Set padding to be 5 padding: 5 // Set the top and bottom paddings to be 5, and left and right paddings to be 10 padding: [5, 10] // Set each of the four paddings separately padding: [
5, // up 10, // right 5, // down 10, // left
]
- itemGap Float(None)#
The gap between the main title and subtitle.
- zlevel Float(None)#
zlevel value of all graphical elements in .
zlevel is used to make layers with Canvas. Graphical elements with different zlevel values will be placed in different Canvases, which is a common optimization technique. We can put those frequently changed elements (like those with animations) to a separate zlevel. Notice that too many Canvases will increase memory cost, and should be used carefully on mobile phones to avoid crash.
Canvases with bigger zlevel will be placed on Canvases with smaller zlevel.
- z Float(None)#
z value of all graphical elements in , which controls order of drawing graphical components. Components with smaller z values may be overwritten by those with larger z values.
z has a lower priority to zlevel, and will not create new Canvas.
- left Union(None)#
Distance between title component and the left side of the container.
left can be a pixel value like 20; it can also be a percentage value relative to container width like ‘20%’; and it can also be ‘left’, ‘center’, or ‘right’.
If the left value is set to be ‘left’, ‘center’, or ‘right’, then the component will be aligned automatically based on position.
- top Union(None)#
Distance between title component and the top side of the container.
top can be a pixel value like 20; it can also be a percentage value relative to container width like ‘20%’; and it can also be ‘top’, ‘middle’, or ‘bottom’.
If the top value is set to be ‘top’, ‘middle’, or ‘bottom’, then the component will be aligned automatically based on position.
- right Union(None)#
Distance between title component and the right side of the container.
right can be a pixel value like 20; it can also be a percentage value relative to container width like ‘20%’.
Adaptive by default.
- bottom Union(None)#
Distance between title component and the bottom side of the container.
bottom can be a pixel value like 20; it can also be a percentage value relative to container width like ‘20%’.
Adaptive by default.
- backgroundColor Any(None)#
Background color of title, which is transparent by default.
> Color can be represented in RGB, for example ‘rgb(128, 128, 128)’. RGBA can be used when you need alpha channel, for example ‘rgba(128, 128, 128, 0.5)’. You may also use hexadecimal format, for example ‘#ccc’.
- borderColor Any(None)#
Border color of title. Support the same color format as backgroundColor.
- borderWidth Float(None)#
Border width of title.
- borderRadius Union(None)#
The radius of rounded corner. Its unit is px. And it supports use array to respectively specify the 4 corner radiuses.
For example:
``` borderRadius: 5, // consistently set the size of 4 rounded corners borderRadius: [5, 5, 0, 0] // (clockwise upper left, upper right, bottom right and bottom left)
- shadowBlur Float(None)#
Size of shadow blur. This attribute should be used along with shadowColor,`shadowOffsetX`, shadowOffsetY to set shadow to component.
For example:
``` {
shadowColor: ‘rgba(0, 0, 0, 0.5)’, shadowBlur: 10
}
Attention: This property works only if show: true is configured and backgroundColor is defined other than transparent.
- shadowColor Any(None)#
Shadow color. Support same format as color.
Attention: This property works only if show: true configured.
- shadowOffsetX Float(None)#
Offset distance on the horizontal direction of shadow.
Attention: This property works only if show: true configured.
- shadowOffsetY Float(None)#
Offset distance on the vertical direction of shadow.
Attention: This property works only if show: true configured.