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 the coordinates of a plot
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

PeterJ

26 Posts

Posted - 02 Jun 2010 :  17:10:13  Show Profile  Reply with Quote
I'm trying to place an icon centered within the plot area inside a ChartView. Methods such as getClippingBounds() give me the bounding rectangle of the ChartView area itself which includes the background, axis etc..

Is there a method available for getting the bounding box of the plot area itself (the area within the axis)

quinncurtis

1586 Posts

Posted - 02 Jun 2010 :  17:34:32  Show Profile  Reply with Quote
Call the coordinate system's getPlotRect() method.

ChartRectangle2D rect = pTransform1.getPlotRect();

We added the time zone option you suggested to the software. It is found in the TimeAxisLabels class.

TimeAxisLabels xAxisLab1 = new TimeAxisLabels(xAxis1);
xAxisLab1.setLabelTimeZone( TimeZone.getTimeZone("GMT"));

You should be able to download the modified software using your original download links.
Go to Top of Page

PeterJ

26 Posts

Posted - 03 Jun 2010 :  11:57:10  Show Profile  Reply with Quote
Thank you on both counts!!! The getPlotRect() is working and I can place icons at precisely as I need too.

I'll test the setLabelTimeZone addition. That is very useful.
Go to Top of Page

quinncurtis

1586 Posts

Posted - 03 Jun 2010 :  12:32:03  Show Profile  Reply with Quote
Our only comment is that placing things in a chart using pixel coordinates is troublesome, because the pixel coordinates are only finalized after the chart is drawn. Anytime the chart is re-sized, old pixel coordinates become invalid and objects will need to be replaced using the new pixel coordinates. We assume that if you have it working you know how to place, and re-place, the image icon after the chart is drawn.

If you place an image in a chart, (you should be able to load your icon as an image) using our ChartImage class, you can place it using physical, plot normalized, or chart normalized coordinates, which will always remain accurate and valid no matter what the chart size. See the ImageCharts example.
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