Click here to Skip to main content
15,900,368 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

Hi,

I tried some for your requirement.

Try this

HTML
<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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900