dg-chart-on-*

功能:绑定图表事件处理函数。

必填:否

元素:<div>图表元素

格式:function(chartEvent){ … }

常用的图表事件处理函数属性有:
单击:dg-chart-on-click
双击:dg-chart-on-dblclick
鼠标按下:dg-chart-on-mousedown
鼠标松开:dg-chart-on-mouseup
鼠标进入:dg-chart-on-mouseover
鼠标离开:dg-chart-on-mouseout

示例

  1. <head>
  2. <script type="text/javascript">
  3. function clickHandler(chartEvent)
  4. {
  5. alert("click");
  6. };
  7. var chartEventHandlers=
  8. {
  9. dblClickHandler: function(chartEvent){ alert("dblclick"); },
  10. mouseoverHandler: function(chartEvent){ alert("mouseover"); },
  11. };
  12. </script>
  13. </head>
  14. <body>
  15. <div dg-chart-widget="..." dg-chart-on-click="function(chartEvent){ alert('click'); }"></div>
  16. <div dg-chart-widget="..." dg-chart-on-click="clickHandler"></div>
  17. <div dg-chart-widget="..." dg-chart-on-dblclick="chartEventHandlers.dblClickHandler"></div>
  18. <div dg-chart-widget="..." dg-chart-on-mouseover="chartEventHandlers.mouseoverHandler"></div>
  19. </body>

图表事件对象(chartEvent)的详细说明文档请参考图表事件对象章节。