Component_echart
Ploy3D • Docs
Ploy3D / Component_echart
Class: Component_echart
UI图表。
Extends
Constructors
new Component_echart()
new Component_echart(
system,canvas,id,options):Component_echart
构造函数。
Parameters
• system: CalynUI
UI系统实例。
• canvas: Canvas
UI画布实例。
• id: number
实例ID。
• options: object & object & object
可选的初始化数据。
Returns
Overrides
Accessors
active
getactive():boolean
元素是否激活。
setactive(b):void
Parameters
• b: boolean
Returns
boolean
Inherited from
aspect_mode
getaspect_mode():"none"|"width_ctrl"|"height_ctrl"
元素宽高比约束模式。
Returns
"none" | "width_ctrl" | "height_ctrl"
Inherited from
aspect_ratio
getaspect_ratio():number
元素当前宽高比。
Returns
number
Inherited from
children
getchildren():Element[]
子级元素列表。
Returns
Element[]
Inherited from
children_occ_height
getchildren_occ_height():number
子级最大总占用设计高度(包含子级 边距,元素自动高度或启用滚动条时需要计算子级最大总占用设计高度)。
Returns
number
Inherited from
children_occ_width
getchildren_occ_width():number
子级最大总占用设计宽度(包含子级边距,元素自动宽度或启用滚动条时需要计算子级最大总占用设计宽度)。
Returns
number
Inherited from
echart_option
getechart_option():EChartsOption
图表样式配置。
Returns
EChartsOption
guid
getguid():string
元素GUID。
Returns
string
Inherited from
height
getheight():object
元素当前设计高度。
Returns
object
height
height:
number
内容区域设计高度 。
occ_height
occ_height:
number
总占用设计高度(包含边距)。
timestrap
timestrap:
number
数据时间戳。
Inherited from
id
getid():number
元素ID。
Returns
number
Inherited from
style
getstyle():object
样式设置。
Returns
object
bg_fill?
optionalbg_fill:boolean
是否填充背景。
bg_fill_color?
optionalbg_fill_color:string
背景填充颜色。
bg_radii?
optionalbg_radii:number
圆角矩形圆弧半径。
bg_stroke?
optionalbg_stroke:boolean
是否描绘背景边框。
bg_stroke_color?
optionalbg_stroke_color:string
背景边框颜色。
bg_stroke_dash?
optionalbg_stroke_dash:number
背景边框虚线间隔(实线长度为间隔的2倍)。
bg_stroke_width?
optionalbg_stroke_width:number
背景边框线宽。
font?
optionalfont:string
字体。
font_color?
optionalfont_color:string
字体颜色。
font_size?
optionalfont_size:number
字体大小(单位PX)。
Inherited from
type
gettype():"canvas"|"layout"|"panel"|"component"
元素类型("layout","canvas"都派生自"panel",所以可以认为只有两大类"component","panel")。
Returns
"canvas" | "layout" | "panel" | "component"
Inherited from
width
getwidth():object
元素当前设计宽度。
Returns
object
occ_width
occ_width:
number
总占用设计宽度(包含边距)。
timestrap
timestrap:
number
数据时间戳。
width
width:
number
内容区域设计宽度。
Inherited from
Methods
AddChild()
AddChild<
T>(option):T
添加子级元素。
Type Parameters
• T extends Element
Parameters
• option: Options
子级元素配置。
Returns
T
Inherited from
Draw()
Draw(
pass,style):Promise<void>
绘制元素。
Parameters
• pass: number
绘制阶段。
• style
• style.bg_fill?: boolean
是否填充背景。
• style.bg_fill_color?: string
背景填充颜色。
• style.bg_radii?: number
圆角矩形圆弧半径。
• style.bg_stroke?: boolean
是否描绘背景边框。
• style.bg_stroke_color?: string
背景边框颜色。
• style.bg_stroke_dash?: number
背景边框虚线间隔(实线长度为间 隔的2倍)。
• style.bg_stroke_width?: number
背景边框线宽。
• style.font?: string
字体。
• style.font_color?: string
字体颜色。
• style.font_size?: number
字体大小(单位PX)。
Returns
Promise<void>
Overrides
OnDrag()
OnDrag(
width,height,event):void
拖拽元素。
Parameters
• width: number
拖拽实际所在平面宽度。
• height: number
拖拽实际所在平面高度。
• event: MouseEvent & object
鼠标事件对象。
Returns
void
Inherited from
Update()
Update(
style):Promise<any>
更新元素绘制范围参数(先根遍历更新)。
Parameters
• style
• style.bg_fill?: boolean
是否填充背景。
• style.bg_fill_color?: string
背景填充颜色。
• style.bg_radii?: number
圆角矩形圆弧半径。
• style.bg_stroke?: boolean
是否描绘背景边框。
• style.bg_stroke_color?: string
背景边框颜色。
• style.bg_stroke_dash?: number
背景边框虚线间隔(实线长度为间隔的2倍)。
• style.bg_stroke_width?: number
背景边框线宽。
• style.font?: string
字体。
• style.font_color?: string
字体颜色。
• style.font_size?: number
字体大小(单位PX)。
Returns
Promise<any>
返回是否绘制当前元素。