We use the RotateLabel function to draw text in the chart_onAfterDraw event. This works great on screen and even w/ exporting the graph. However, when you print, the rotated text suddenly becomes huge. A workaround is to export the EMF and then print that, but it is cumbersome.
Here is an example, use Right-Click save As to get http://www.phoenix-int.com/~nsharp/teeChartTextBug.xls
Click on the button on the main sheet. A tee-chart will pop up.
Click on the "Show Editor" and use the editor to print the page.
We are using TeeChart 6.0.0.4 and the problem repeats in Win2k and WinXP.
Thank you,
Nathan
Problems w/ rotateLabel and printing
Well, after a huge pile of paper on the floor beside my printer, I believe I have everything printing O.K. Used the technique mentioned in some of your pages where you export a meta-file and then print the metafile. I couldn't find any sample code for VB, so it took some finagling to figure it out. Also, there are still parts that I don't understand. Some of what I discovered:
1) In order for the aspect ratio to come out right, I have to resize the actual chart control before exporting the meta file (otherwise even if I scale the output meta file or print job to the right aspect ratio, the text comes out too wide or too skinny)
2) I could not figure out what the heck the units on the TChart1.export.asMetafile.Width is supposed to be. I ended up simply picking a scaling factor at random and tweaking it until the printout came out the right size (ended up using Printer.ScaleWidth / 15)
3) With this technique I of course completely loose the print preview capability you provide.
4) I had to add custom code to come up with a reasonable temp file name to use and be sure to delete it. It would be nice to just print through w/o generating a metafile.
Sure would be good if your built-in printing stuff handled this automatically.
1) In order for the aspect ratio to come out right, I have to resize the actual chart control before exporting the meta file (otherwise even if I scale the output meta file or print job to the right aspect ratio, the text comes out too wide or too skinny)
2) I could not figure out what the heck the units on the TChart1.export.asMetafile.Width is supposed to be. I ended up simply picking a scaling factor at random and tweaking it until the printout came out the right size (ended up using Printer.ScaleWidth / 15)
3) With this technique I of course completely loose the print preview capability you provide.
4) I had to add custom code to come up with a reasonable temp file name to use and be sure to delete it. It would be nice to just print through w/o generating a metafile.
Sure would be good if your built-in printing stuff handled this automatically.