....
....前面代码省略
Series s = Chart1.Series["Default"];//
s.Points.DataBind(dt, "项", "数", "");//绑上数据(dt为dataTable数据源)
//给每个小图区指定执行的javascript
for (int i = 0; i < s.Points.Count; i++)
{
s.Points[i].MapAreaAttributes = "onclick=\"javascript:function1();\"";//点击某图区执行javascript的function1方法
}
本文链接http://www.cxybl.com/html/wyzz/JavaScript_Ajax/20130124/36507.html
时间: 2024-12-06 15:08:05