Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Java
 QCChart2D for Java
 Getting location lhs of legend label
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

PeterJ

26 Posts

Posted - 06 Jul 2010 :  18:35:07  Show Profile  Reply with Quote
I'm trying to get the position (in DEV coordinates) of the left had side of the longest legend label. Is there a way to get this? The bounding box method gets me the position of the legend.

In the chart at the top of the forum page, this would be the x,y location of the $ on the $23 label.

quinncurtis

1586 Posts

Posted - 06 Jul 2010 :  21:14:23  Show Profile  Reply with Quote
I don't know if you are referring to the legend, or the y-axis labels. You say legend, but then you reference a y-axis label, i.e. $23.
Go to Top of Page

PeterJ

26 Posts

Posted - 06 Jul 2010 :  21:27:12  Show Profile  Reply with Quote
Sorry, it is the y-axis labels (the NumericAxisLabels). Using the getLocation method gives me the right hand side. I'm looking for the left hand side. I cannot find a method to get the NumericLabels that make up a NumericAxisLabels.

Go to Top of Page

quinncurtis

1586 Posts

Posted - 07 Jul 2010 :  08:44:56  Show Profile  Reply with Quote
You should be able to call the getBoundingBox() method of the axis labels.

ChartRectangle2D rect = yAxisLabels.getBoundingBox();

This assumes the labels have already been drawn to the screen, otherwise the return value of the bounding box is meaningless.
Go to Top of Page

PeterJ

26 Posts

Posted - 26 Jul 2010 :  17:41:11  Show Profile  Reply with Quote
Sorry to take so long to reply. That worked very well.

We actually have a very nice application build now on top of QC. We'd be happy to share that with you if you need a reference customer.
Go to Top of Page

quinncurtis

1586 Posts

Posted - 27 Jul 2010 :  06:32:49  Show Profile  Reply with Quote
Thanks. Post an image of a typical chart in your application using the Insert Image option (fourth icon from right on format bar). We always like to see examples of our customers applications. It gives us ideas for new example programs. If you don't have a public URL to post the image on, you can use a free image posting service such as ImageShack, http://www.imageshack.us/.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07