所有组件都支持的
Action 定义
定义多个通用 Action
- 可拖拽(移动)
- Action 委托对象 ```javascript class ComponentMove extends Action { start() {} move() {} end() {} reset() {} }
class ComponentDelegation extends Action { show() {} resize() {} move() {} hide() {} }
- 移动
```javascript
G2.RegisterInteraction('drag-component', {
start: [
{trigger: 'component:dragstart', action: 'component-move:start'},
{trigger: 'component:dragstart', action: 'component-delegation:show'}
],
processing: [
{trigger: 'component:drag', action: 'component-move:move;component-delegation:move'},
],
end: [
{trigger: 'component:dragend', action: 'component-move:end'},
{trigger: 'component:dragend', action: 'component-delegation:hide'},
]
});
分类 Legend
Action
class LegendItemActive extends Action {
active() {}
reset() {}
}
class LegendItemChecked extends Action {
toggle() {}
check() {}
uncheck() {}
}
class LegendItemHighlight extends Action {
highlight() {}
reset() {}
}
class LegendItemMoveOrder extends Action {
start() {}
move() {}
end() {}
reset() {}
}
- acitve
- checked
- highlight
- 拖拽排序
- 编辑
连续 Legend
- 改变值
- 显示 tip
Axis
- 高亮 label
- 重排序
- 编辑
- 拖拽到 title
Tooltip
- 显示单条记录的 action
- 多条数据 tooltip
- 多View联动的 tooltip 展示
Annotation
- 拖拽
- 编辑