new ComponentModel()
组件Model类
Extends
Members
-
emphasisList
-
{Array
} 支持emphasis配置的选项数组,兼容emphasis另一种写法 -
type
-
{string} 组件名type
Methods
-
dataDirty(action)
-
触发dataDirty的事件
Parameters:
Name Type Description actionObject Returns:
-boolean true
-
dirty(action)
-
标记为脏,将被更新
Parameters:
Name Type Description actionObject 触发dirty的事件
- Inherited From:
-
get(keyopt) → {any}
-
获取实际option
Parameters:
Name Type Attributes Description keystring <optional>
获取option内的key属性,若不传返回全部option
Returns:
any -返回key对应的属性
- Overrides:
-
getAxisModel(xOrY) → {Object}
-
根据$axisIndex获取axisModel
Parameters:
Name Type Description xOrYstring 'x'或'y'
Returns:
Object -axisModel
-
getData(keyopt) → {any}
-
获取计算后的数据
Parameters:
Name Type Attributes Description keystring <optional>
返回内部data
Returns:
any -返回数据
-
isDataDirty() → {boolean}
-
是否为dataDirty
Returns:
boolean -是否为dataDirty
-
isDirty() → {boolean}
-
是否为dirty
Returns:
boolean -是否为dirty
- Inherited From:
-
set(key, valueopt)
-
设置option TODO 设置的option与之前相同时
Parameters:
Name Type Attributes Description keystring | Object 属性名或者属性对象
valueany <optional>
属性内容
- Overrides:
-
shouldModelDirty(action, model, globalModel) → {boolean}
-
是否需要设置为dirty
Parameters:
Name Type Description actionObject 触发dirty的事件
modelObject 组件model
globalModelObject globalModel
Returns:
boolean -是否需要标记dirty
- Inherited From:
-
update()
-
子类需实现update方法
- Inherited From:
-
updateData()
-
通过$dataIndex更新数据