Jump to content
Software FX Community

To get the postion of a point in Graph


veena

Recommended Posts

How to find the position of a point (pixel possition in graph) in java, if x and y values are given ? I need to attach images using annotation. For that top and left positions need to be given. These images should be at the end of Gannt bar according to the X values. So its left position is dynamic. Please help me in finding this. Thanks in advance.

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

You can use the valueToPixel method. This method convert a logical chart value to its position in pixels for a selected axis.

chart1.getAxisX().valueToPixel(double dValue)

When positioning annotation objects in the chart area, you may want to convert a particular position in the chart area given in axis units to screen coordinates (pixels). Therefore, this method is particularly useful for this purpose.

Regards,

Randy Jimenez

 

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.

×
×
  • Create New...