所有组件都支持的

Action 定义

定义多个通用 Action

  • 可拖拽(移动)
  • Action 委托对象 ```javascript class ComponentMove extends Action { start() {} move() {} end() {} reset() {} }

class ComponentDelegation extends Action { show() {} resize() {} move() {} hide() {} }

  1. - 移动
  2. ```javascript
  3. G2.RegisterInteraction('drag-component', {
  4. start: [
  5. {trigger: 'component:dragstart', action: 'component-move:start'},
  6. {trigger: 'component:dragstart', action: 'component-delegation:show'}
  7. ],
  8. processing: [
  9. {trigger: 'component:drag', action: 'component-move:move;component-delegation:move'},
  10. ],
  11. end: [
  12. {trigger: 'component:dragend', action: 'component-move:end'},
  13. {trigger: 'component:dragend', action: 'component-delegation:hide'},
  14. ]
  15. });

分类 Legend

Action

  1. class LegendItemActive extends Action {
  2. active() {}
  3. reset() {}
  4. }
  5. class LegendItemChecked extends Action {
  6. toggle() {}
  7. check() {}
  8. uncheck() {}
  9. }
  10. class LegendItemHighlight extends Action {
  11. highlight() {}
  12. reset() {}
  13. }
  14. class LegendItemMoveOrder extends Action {
  15. start() {}
  16. move() {}
  17. end() {}
  18. reset() {}
  19. }
  • acitve
  • checked
  • highlight
  • 拖拽排序
  • 编辑

连续 Legend

  • 改变值
  • 显示 tip

Axis

  • 高亮 label
  • 重排序
  • 编辑
  • 拖拽到 title

Tooltip

  • 显示单条记录的 action
  • 多条数据 tooltip
  • 多View联动的 tooltip 展示

Annotation

  • 拖拽
  • 编辑