new ChartView()
Extends
Methods
-
downplay(seriesModel, globalModel, global, payload)
-
取消高亮
Parameters:
Name Type Description seriesModelobject globalModelobject globalobject payloadobject -
eachShape(func)
-
遍历shape
Parameters:
Name Type Description funcfunction 遍历函数
- Inherited From:
-
getShape(name, keyopt) → {Object}
-
根据name获取通过setShape或setShapeGroup方法设置的shape
Parameters:
Name Type Attributes Description namestring keystring <optional>
仅在shape为Group时有效
Returns:
Object -shape | shapeGroup
- Inherited From:
-
highlight(seriesModel, globalModel, global, payload)
-
高亮
Parameters:
Name Type Description seriesModelobject globalModelobject globalobject payloadobject -
remove()
-
移除view内所有图形
- Inherited From:
-
removeEdit(model, globalModel, global)
-
移除edit状态相关图形
Parameters:
Name Type Description modelObject globalModelObject globalObject - Inherited From:
-
removeShape(name)
-
移除指定的shape
Parameters:
Name Type Description namestring - Inherited From:
-
render(model, globalModel, global)
-
渲染函数
Parameters:
Name Type Description modelObject globalModelObject globalObject - Inherited From:
-
renderEdit(model, globalModel, global)
-
编辑状态渲染函数
Parameters:
Name Type Description modelObject globalModelObject globalObject - Inherited From:
-
scale(offsetX, offsetY, wheelDelta)
-
缩放view
Parameters:
Name Type Description offsetXnumber 缩放中线点X
offsetYnumber 缩放中心点Y
wheelDeltanumber 缩放比例
- Inherited From:
-
set(name, shape) → {Object}
-
直接设置shape
Parameters:
Name Type Description namestring shapeObject Returns:
Object -shape
- Inherited From:
-
setShape(name, Shape, shapeAttr, animateOption, initCallback) → {Object}
-
设置单个shape,若不存在则创建,若存在则更新
Parameters:
Name Type Description namestring 存储的名字
ShapeObject 要创建的Shape类
shapeAttrObject 要创建shape的相关属性attr
animateOptionObject 动画相关属性
Properties
Name Type Attributes Description animationboolean <optional>
是否动画
animateFromObject <optional>
动画起始状态属性,
durationnumber <optional>
动画时长
easingstring | function <optional>
动画类型
animateListObject <optional>
要过渡的动画属性列表
initCallbackfunction 初始化shape的回调
Returns:
Object -shape
- Inherited From:
-
setShapeGroup(name, Shape, shapeAttrArray, animateOption, initCallback, createCallback) → {Object}
-
设置一组shape,根据所设置的key创建新或移除
Parameters:
Name Type Description nameString 存储的名字
ShapeObject 要创建的Shape类
shapeAttrArrayArray 要创建shape的相关属性attr数组,!!!若需要动画,需指定每个shape的唯一key,以对对应的shape添加过渡动画!!!
animateOptionObject 动画相关属性
Properties
Name Type Attributes Description animationboolean <optional>
是否动画
animateFromObject <optional>
动画起始状态属性,
durationnumber <optional>
动画时长
easingstring | function <optional>
动画类型
animateListObject <optional>
要过渡的动画属性列表
animateLeaveObject <optional>
remove时动画属性列表
initCallbackfunction shapeGroup创建时的回调
createCallbackfunction shapeGroup内新增shape时的回调
Returns:
Object -shapeGroup
- Inherited From: