mcstoufer Posted October 1, 2010 Report Posted October 1, 2010 When adding an AnnotationText object with a colored border to a chart, I'm noticing that the text is anchored to the top-left portion of the border. Using the siteToFit() method does not fix this. I tried to change the alignment and the text still stays at the top of the bounding box. How do I add some padding around the text and the border? http://energyiq.lbl.gov/images/annotationText.tiff I have attached an image to this post, so hopefully it shows up. (http://energyiq.lbl.gov/images/annotationText.tiff) Quote
CarlosAC Posted October 7, 2010 Report Posted October 7, 2010 Hi mcstoufer Please contact Software FX Support at support[at]softwarefx[dot]com. Please provide us with the simplest form of the code (small compliable sample project) that reproduces the problem. Please remove the extra-code that is not related to Chart FX. Include your product serial number and/or support account in order to properly track your incidents. Carlos Chaves Quote
mcstoufer Posted October 7, 2010 Author Report Posted October 7, 2010 CJU70************Keep in mind that this is extracted from a JSF Managed Bean context, so the main() doesn't really exist. Also, this is being rendered on a Mac Pro running Snow Leopard OS X 10.6.4 with Java 1.6.Annotations annots = new Annotations();Font font = new Font("Helvetica", Font.PLAIN, 11);Color fontColor = Color.decode("0x464646");Color annotBubbleColor = Color.decode("0x9F4B9E");AnnotationArrow yourArrow = new AnnotationArrow();AnnotationText yourBldg = new AnnotationText();annots.getList().add(yourArrow);annots.getList().add(yourBldg);yourBldg.setFont(font);yourBldg.setTextColor(fontColor);yourBldg.setColor(java.awt.Color.WHITE);yourBldg.getBorder().setColor(annotBubbleColor);yourArrow.getBorder().setColor(annotBubbleColor);yourArrow.getBorder().setWidth(4);yourBldg.setText(String.format("Your Building:\n101 kW/h\n15th percentile"));yourBldg.setOrientation(0);yourBldg.setLineAlignment(StringAlignment.FAR); // Tried the other two enum values here w/no apparent change.yourBldg.sizeToFit();yourBldg.attach(50, 50);yourArrow.setHeight(70);yourArrow.setWidth(0);yourArrow.attach(50,75);chart.getExtensions().add(annots); Quote
CarlosAC Posted October 8, 2010 Report Posted October 8, 2010 Hi mcstoufer I was unable to reproduce the issue, I changed the StringAlignment and it is working fine for me. I recommend you to contact our support service by mail. Please notice that the image you add to current forum is not visible, please include it to your mail. Carlos Chaves Quote
AndreG Posted October 8, 2010 Report Posted October 8, 2010 According to our license agreement your Serial Number is to be kept by you only and in secrecy. Please do not post it on the forums. Thanks. Quote
mcstoufer Posted October 8, 2010 Author Report Posted October 8, 2010 Then why did Carlos ask for it to be supplied in the first place??? Quote
AndreG Posted October 8, 2010 Report Posted October 8, 2010 When contacting support [at] softwarefx.com, we ask our users to provide us with their serial numbers. Never on the forums. I apologize for the confusion. Quote
mcstoufer Posted October 8, 2010 Author Report Posted October 8, 2010 Thank you for the clarification. I will make a note of this on my end for the next time this info is requested. Quote
CarlosAC Posted October 8, 2010 Report Posted October 8, 2010 Hi mcstoufer I apologize for the misunderstanding. I meant Quote
Recommended Posts
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.