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
示例:
<head>
<script type="text/javascript">
function clickHandler(chartEvent)
{
alert("click");
};
var chartEventHandlers=
{
dblClickHandler: function(chartEvent){ alert("dblclick"); },
mouseoverHandler: function(chartEvent){ alert("mouseover"); },
};
</script>
</head>
<body>
<div dg-chart-widget="..." dg-chart-on-click="function(chartEvent){ alert('click'); }"></div>
<div dg-chart-widget="..." dg-chart-on-click="clickHandler"></div>
<div dg-chart-widget="..." dg-chart-on-dblclick="chartEventHandlers.dblClickHandler"></div>
<div dg-chart-widget="..." dg-chart-on-mouseover="chartEventHandlers.mouseoverHandler"></div>
</body>
图表事件对象(chartEvent)的详细说明文档请参考图表事件对象章节。