Jump to content
Software FX Community

display image when we move mouse over!


thanhtung
 Share

Recommended Posts

Dear all!

I draw chart fx (Gallery.Lines) in Web.

Now, I want to display image when we move mouse over point.

who do you know about this problem? pls support for me.

 

Ps:/ I see some even as:

Link.OnMouseOver

Link.OnMouseOut

Link.OnMouseDown

 

==> so, what do you meaning of all even?

Pls share data for me?

 Thank you very much!

 

 

Link to comment
Share on other sites

  • 2 weeks later...

[color= #1f497d; mso-ansi-language: EN-US" lang=EN-US>Hi thanhtung<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

In the samples the chart is added to a <div> tag.  You can remove the chart and the code related to this chart.  Then, you can add you own static image.

 

Please note that, in the sample

Link to comment
Share on other sites

 thank you so much!

I still have a question!

As support, we must write code by script (java) to find mouse position then display image... ==> Write fix display image for one chart.

So, Can we write one function by vb.net to do it??

 We want to display image static for chart dynamic

>> Example: If I choose Male, it will display one chart, and we choose all (male and female), this form display two chart.

And, with one chart will have the property display other image when move the mouse....

======================================= 

function mousemove(e) {
  e = e || window.event;
  var divTag = $('<%=MyDiv.ClientID %>');

  if (topPosition == 0) {
  var chartTag = $('<%=Chart1.ClientID %>'); //  I want this chart is dynamic
  leftPosition = getXLocationFromBody(chartTag) + (chartTag.clientWidth / 2);
  topPosition = getYLocationFromBody(chartTag) + (chartTag.clientHeight / 2);
  }

  var mouseXPosition = getMousePosX(e);
  var mouseYPosition = getMousePosY(e);

  var mouseX
  if (mouseXPosition > leftPosition)
  mouseX = mouseXPosition - 10;
  else
  mouseX = mouseXPosition + 10;

  var mouseY
  if (mouseYPosition > topPosition)
  mouseY = mouseYPosition - 10;
  else
  mouseY = mouseYPosition + 10;

  divTag.style.left = mouseX + "px";
  divTag.style.top = mouseY + "px";
  divTag.style.position = "absolute";
  }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...