我正在使用Asp.net图表和显示条形图。我使用dataPoint.MapAreaAttributes调用一个JS函数(检索ID),在单击现有图表中的特定条形图时显示下一个图表。但我无法将鼠标指针显示在图表上的特定条形图上。当我使用Datapoint.Url时,它会将鼠标指针更改为将鼠标放在工具条上,但我无法调用JS函数。那么如何在鼠标悬停在特定的栏上时显示手指针呢?
发布于 2011-04-21 21:37:44
<asp:Image ID="Image1" runat="server" onmouseover="this.style.cursor='hand'" onmouseout="this.style.cursor='default'" />
发布于 2012-02-01 04:28:01
这是解决方案(在VB.Net中):
在创建图表时,以编程方式迭代所有系列数据点,如下所示:
While ...
Dim oPoint as DataPoint = objSeries.Points(n)
'add code for OnMouseMove and OnMouseOut events
oPoint.MapAreaAttributes = "OnMouseOver=""document.body.style.cursor = 'pointer';"""
oPoint.MapAreaAttributes = oPoint.MapAreaAttributes & "OnMouseOut=""document.body.style.cursor = 'default';"""
End While关于M.R.
发布于 2010-08-23 14:06:17
https://stackoverflow.com/questions/3545058
复制相似问题