在VS2008中的ASP.NET CHART CONTROL中在Mouseover或Tooltip上显示数据值 [英] show data values on Mouseover or Tooltip in ASP.NET CHART CONTROL in VS2008
本文介绍了在VS2008中的ASP.NET CHART CONTROL中在Mouseover或Tooltip上显示数据值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
HELLO朋友,
我正在ASP.NET 3.5中开发Web应用程序.
我想显示数据点的值,即鼠标悬停或数据点的工具提示上的Y轴值.
您能建议怎么可能吗?
等待回复,
Kishor
HEllo Friends,
I am developing a web application in ASP.NET 3.5 .
I want to show the values of datapoints i.e Y axis values on mouseover or tooltip of the datapoint .
Can you please suggest how is it possible.
Awaiting for reply,
Kishor
推荐答案
我根据您的要求尝试了一些.
试试这个
Hi,
I tried some for your requirement.
Try this
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script language ="javascript">
function f1() {
document.getElementById("tooltipid").innerHTML = "mouse y axis is:" + event.clientY;
document.getElementById("tooltipid").style.left = event.clientX;
document.getElementById("tooltipid").style.top = event.clientY;
}
function f2() {
document.getElementById("tooltipid").innerHTML = "";
}
</script>
</head>
<body >
<form id="form1" runat="server">
<div>
<div id="fixeddivid" onmouseenter="f1()" onmouseleave="f2()" style=" width :50px; background-color :Red; color :White ; position :fiexd; left :50px; top :50px;">This is fixed div tag</div>
</div>
<div style=" position:absolute ; background-color :Black; color:White;" id="tooltipid"></div>
</form>
</body>
</html>
我希望你能理解我写的内容.
您可以根据自己的要求更改此代码
一切顺利.
I hope you understood What I wrote.
You can change this code according to your rewuirement
All the Best.
这篇关于在VS2008中的ASP.NET CHART CONTROL中在Mouseover或Tooltip上显示数据值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文