Print issues with graph and annotation
Print issues with graph and annotation
When i try to print (using similar code to the example provided in the features), it prints, but the the annotation's position gets screwed up. Also, it sets the charts background to white, thus hiding the labels.
Any feedback on whether this is a bug, and if so, when will it be fixed?
Thanks
Any feedback on whether this is a bug, and if so, when will it be fixed?
Thanks
Re: Print issues with graph and annotation
Here's the code that gets executed when the Print Button is pressed
Code: Select all
PreviewDialog d = new PreviewDialog(chart);
d.setModal(true);
d.setVisible(true);
Re: Print issues with graph and annotation
It also puts another copy of the chart on top of the original copy but moved a bit to the top and a little to the right.
Re: Print issues with graph and annotation
Hi Turc,
I've seen that the background color is set to white and the annotation, if you don't change the margins in the preview dialog, isn't shown.
I've also seen that if you change the margins, they don't seem to be respected and all the paper is taken.
I've added it to the defect list to be fixed in future releases (TJ71015133)
I've seen that the background color is set to white and the annotation, if you don't change the margins in the preview dialog, isn't shown.
I've also seen that if you change the margins, they don't seem to be respected and all the paper is taken.
I've added it to the defect list to be fixed in future releases (TJ71015133)
I haven't been able to reproduce it. Here it is the project I used to test it. Could you modify it so we can reproduce the problem here?Turc wrote:It also puts another copy of the chart on top of the original copy but moved a bit to the top and a little to the right.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: Print issues with graph and annotation
Is there a set date for when this bug is going to get fixed?
Or should i work around it and fix it myself just like i've done for 80% of your "features"?
Or should i work around it and fix it myself just like i've done for 80% of your "features"?
Re: Print issues with graph and annotation
Hello,
Re.
We are checking through the points in question and should hopefully be able to get any applied resolution to you for testing early next week.
Regards,
Marc Meumann
Re.
ouch.fix it myself just like i've done for 80% of your "features"?
We are checking through the points in question and should hopefully be able to get any applied resolution to you for testing early next week.
Regards,
Marc Meumann
Steema Support
Re: Print issues with graph and annotation
Hello,
As a followup, the issues are taking a little longer to resolve than initially expected but we should be able to make an build available shortly.
Regards,
Marc
As a followup, the issues are taking a little longer to resolve than initially expected but we should be able to make an build available shortly.
Regards,
Marc
Steema Support
Re: Print issues with graph and annotation
Thank you for the update. Will this fix also keep any objects on the chart in sync when printed?
Also, I currently add annotations to a chart. When the chart is scrolled/moved horizontally, i update the annotations positions so that they seem to move with the chart. The issue is that when i have a lot of things going on in my program, the annotations lag when the chart is scrolled/moved. Is there a command that i don't know about that will grab the annotation and fuse it to the chart so that i don't have to keep updating the annotation's position, which in result will remove the lag issues that im currently experiencing?
Also, I currently add annotations to a chart. When the chart is scrolled/moved horizontally, i update the annotations positions so that they seem to move with the chart. The issue is that when i have a lot of things going on in my program, the annotations lag when the chart is scrolled/moved. Is there a command that i don't know about that will grab the annotation and fuse it to the chart so that i don't have to keep updating the annotation's position, which in result will remove the lag issues that im currently experiencing?
Re: Print issues with graph and annotation
Hello,
For other versions of TeeChart (VCL, NET, AX), metafile (ie. vector Windows metafile wmf) format is available at print time. That allows a whole-chart rescale for the printable page whilst respecting all respective locations. Vector output isn't available natively to swing/awt in Java and that has led to some delay with the work inhand. There are some alternatives that are being studied.
One alternative that is tested with some degree of success but that may have to be considered a halfway house is to adjust an annotation's position with respect to new Chart size at print time, relative to the annotation position on the form-visible chart. That is fine for one of the fixed position annotations (left-top, right-top, etc) but runs the risk, for custom-positioned annotations, of moving the position of an annotation that may already have a dynamic position coded by the designer. That relates somewhat to your question:
Re.
eg.
The above code will fix the annotation's position no matter where it is plotted. The above could also be written to associate with a Series Data point via the Series CalcXPos, CalcYPos.
It may be that the interim fix we'll need to deliver for annotation positioning on printing is to guarantee position for non-custom positioned annotations but to allow custom, axis scale related positioning (as above) to remain variable and overridable.
Regards,
Marc
For other versions of TeeChart (VCL, NET, AX), metafile (ie. vector Windows metafile wmf) format is available at print time. That allows a whole-chart rescale for the printable page whilst respecting all respective locations. Vector output isn't available natively to swing/awt in Java and that has led to some delay with the work inhand. There are some alternatives that are being studied.
One alternative that is tested with some degree of success but that may have to be considered a halfway house is to adjust an annotation's position with respect to new Chart size at print time, relative to the annotation position on the form-visible chart. That is fine for one of the fixed position annotations (left-top, right-top, etc) but runs the risk, for custom-positioned annotations, of moving the position of an annotation that may already have a dynamic position coded by the designer. That relates somewhat to your question:
Re.
You may already be using this technique to scroll the annotation on the Chart but if not it might be worth taking note as this would be the preferred option to custom-positioning just about any custom item on the Chart. ie. to always relate the items position to an axis location, whether that be some fixed axis location such as 0,0 or a data point location (ie. tag-labelling a point as it scrolls across a moving chart). This also resolves positioning issues at print time.Is there a command that i don't know about that will grab the annotation and fuse it to the chart
eg.
Code: Select all
/*(*note tool1 = new Annotation(chart1.getChart());)*/
chart1.addChartPaintListener( new com.steema.teechart.events.ChartPaintAdapter() {
public void chartPainted(ChartDrawEvent pce) {
Point p1 = new Point( chart1.getAxes().getBottom().calcXPosValue(5),
chart1.getAxes().getLeft().calcYPosValue(
chart1.getAxes().getLeft().getMinimum()+
(chart1.getAxes().getLeft().getMaximum()
-chart1.getAxes().getLeft().getMinimum())/2.0));
//annotation fixed to halfway up left axis .. value 5 on x axis
tool1.setLeft(p1.x);
tool1.setTop(p1.y);
}
});
It may be that the interim fix we'll need to deliver for annotation positioning on printing is to guarantee position for non-custom positioned annotations but to allow custom, axis scale related positioning (as above) to remain variable and overridable.
Regards,
Marc
Steema Support
Re: Print issues with graph and annotation
Thank marc.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Print issues with graph and annotation
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |