Problem of Printing Axis' Labels and Titles

TeeChart for ActiveX, COM and ASP
Post Reply
DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Problem of Printing Axis' Labels and Titles

Post by DVT » Wed Feb 26, 2014 3:28 pm

I have one existing application which was based on V505. After I updated the version to 2013, the printed labels/titles are off the axis to somewhere at the top-left corner and the font size is way smaller; the chart's titles are not lined up either, and the font size is smaller; border lines are drawn at the right and bottom.
Attachments
DVT_TeeChart_5_Print.png
It was perfect to using TeeChart 5.
DVT_TeeChart_5_Print.png (241.37 KiB) Viewed 29016 times
DVT_print_issue.png
Printing has problems including save it to PDF file.
DVT_print_issue.png (122.27 KiB) Viewed 28981 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem of Printing Axis' Labels and Titles

Post by Yeray » Thu Feb 27, 2014 11:50 am

Hello,

This looks very similar to this:
http://www.teechart.net/support/viewtop ... 113#p64113

Could you please try if disabling GDI+ gives better looking prints?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Re: Problem of Printing Axis' Labels and Titles

Post by DVT » Thu Feb 27, 2014 3:13 pm

Hi there,

Thanks for your help. Setting GDI+ to false is a workaround for the font and size of printed axis labels and titles, but the right and bottom lines still appear on the printed sheet (no lines on the screen).

I'm currently using TeeChart2013_0_1_1ActiveX3264, though the file version of TeeChart2013.ocx says "2012.0.0.8". I downloaded the latest version from your website which was TeeChart2013_0_1_4ActiveX3264. However, I got an error message saying "Error while activating license: 1168" while I was trying to do update it by using my license number, which I got only a couple of months ago (last Dec.).

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Problem of Printing Axis' Labels and Titles

Post by Narcís » Fri Feb 28, 2014 9:41 am

Hello,

Thanks for your feedback.
DVT wrote: Thanks for your help. Setting GDI+ to false is a workaround for the font and size of printed axis labels and titles, but the right and bottom lines still appear on the printed sheet (no lines on the screen).
Could you please attach a simple example example project we can run "as-is" to reproduce the problem here?
DVT wrote: I'm currently using TeeChart2013_0_1_1ActiveX3264, though the file version of TeeChart2013.ocx says "2012.0.0.8". I downloaded the latest version from your website which was TeeChart2013_0_1_4ActiveX3264. However, I got an error message saying "Error while activating license: 1168" while I was trying to do update it by using my license number, which I got only a couple of months ago (last Dec.).
I see no reason why the license number you use to log into this forum should give an error activating the license. Please contact our Sales Dept. at sales at steema dot com with your licensing details and any activation number the installer may provide.

Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Problem of Printing Axis' Labels and Titles

Post by Narcís » Fri Mar 21, 2014 2:50 pm

Hello,

As an update, the issue discussed here may be related to what Pep posted here.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Re: Problem of Printing Axis' Labels and Titles

Post by DVT » Wed Dec 03, 2014 6:46 pm

Today I tried your latest version (TeeChart Pro Activex Control v2014, v2014.0.0.2 Released on 20th November 2014). It looked like the issues were still not solved. I used it in an MFC project in Visual Studio 2012 (Win 7).

The attached shows the problems:
1. Axis's name (or title): it was printed at the top-left corner far away from the axis (should at the left-middle close to the axis's labels), if set GDI+ as true.
2. Axis's labels (numbers): they were to close to the plot (overlapped), if set GDI+ as true.
3. Axis's name (or tile): it was to close to the axis's labels and overlapped, if set GDI+ as false.
4. Extra lines: one lien on each of the bottom and the right edge, no matter GDI+ is set as true or false.
5. And the titles were still messed up (see the previous attachment DVT_print_issue.png)
The screen and preview were perfect.
Attachments
GDIplusTrue.JPG
problems circled in red
GDIplusTrue.JPG (421.56 KiB) Viewed 28676 times
GDIplusFalse.JPG
problems circled in red
GDIplusFalse.JPG (486.78 KiB) Viewed 28684 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem of Printing Axis' Labels and Titles

Post by Yeray » Thu Dec 04, 2014 10:21 am

Hello,

I've created a simple application in VB6 with just a Chart and a Commander on the form and this code:

Code: Select all

Private Sub Form_Load()
  TeeCommander1.ChartLink = TChart1.ChartLink
  
  TChart1.Aspect.View3D = False
  TChart1.Legend.Visible = False
  
  TChart1.AddSeries scLine
  TChart1.Series(0).FillSampleValues 100
  
  TChart1.Axis.Left.Title.Caption = "Depth (m)"
  TChart1.Axis.Bottom.Title.Caption = "Offset (m)"
End Sub
I've printed the chart to a pdf virtual printer (PDFCreator) through the "Print" button in the commander.
Then I've opened the editor through the commander and switched from GDI+ to GDI at the "Chart\3D\Render" tab.
Finally, I've closed the editor and printed the chart again with the same tool and the same "Print" button in the commander.

Both charts look correct in the pdf files:
Portrait.zip
(24.04 KiB) Downloaded 1228 times
Could you please check if printing to a pdf virtual printer also reproduces the problem for you?
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Re: Problem of Printing Axis' Labels and Titles

Post by DVT » Thu Dec 04, 2014 2:40 pm

Yes. The problems are still persist.
1. After using the new TeeChart2014 (and 2013), the title on print out are not aligned properly, no matter set GDI+ true or false. It looks the exactly the same on screen as before.
1. On the pdf print out, it is the exactly the same result as on a paper print, the y-axis title is printed at the top-left corner and the font is way smaller and hard to see.
See the attachment.
Attachments
print_to_pdf_GDIplus_true.png
set GDI+ true: y-axis title is printed at the top-left corner and the font is way small.
print_to_pdf_GDIplus_true.png (13.01 KiB) Viewed 28666 times
print_to_pdf_GDIplus_false.png
set GDI+ false: y-axis title looks OK but the title alignment is not nice
print_to_pdf_GDIplus_false.png (9.32 KiB) Viewed 28667 times
screen.png
screen capture - no matter set GDI+ true or false - it is the same as before moving to TeeChart2013 or 2014
screen.png (8.24 KiB) Viewed 28666 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem of Printing Axis' Labels and Titles

Post by Yeray » Fri Dec 05, 2014 8:45 am

Hi,
DVT wrote: 1. After using the new TeeChart2014 (and 2013), the title on print out are not aligned properly, no matter set GDI+ true or false. It looks the exactly the same on screen as before.
Could you please send us a simple example project we can run as-is to reproduce the problem here?
Thanks in advance.
DVT wrote: 1. On the pdf print out, it is the exactly the same result as on a paper print, the y-axis title is printed at the top-left corner and the font is way smaller and hard to see.
Good. At least we'll be able to make the necessary tests without wasting paper :)
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Re: Problem of Printing Axis' Labels and Titles

Post by DVT » Tue Dec 09, 2014 7:36 pm

Looks like the latest version (2014.0.0.2) fixed most of the problems. However, there is still one issue on print out - one line on each left and bottom. The attached sample project shows that. To build the project, the files in Tee_Files_0 and TeeFiles_1 need to put in the project's Tee_Files folder which is empty in the MFCApplication1.zip file.

The result will be followed due to the limitation to the files attached.
Attachments
Tee_Files_1.zip
TeeChart files included in the project
(313.43 KiB) Downloaded 1266 times
Tee_Files_0.zip
TeeChart files included in the project
(302.35 KiB) Downloaded 1285 times
MFCApplication1.zip
Sample Project - the TeeChart include files are attached with Tee_Files_0 and Tee_Files_1 due to the file size limitation
(88.16 KiB) Downloaded 1172 times

DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Re: Problem of Printing Axis' Labels and Titles

Post by DVT » Tue Dec 09, 2014 7:38 pm

The print out issue: extra lines on right and bottom.
Attachments
smaple print.png
smaple print.png (49.3 KiB) Viewed 28592 times

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem of Printing Axis' Labels and Titles

Post by Yeray » Wed Dec 10, 2014 1:24 pm

Hello,

You can set the Outer Bevel to none as noted here.
In your case, you can do as follows to save the status of the Outer Bevel and restore it after printing:

Code: Select all

void CMFCApplication1View::OnFilePrint() 
{
	if (m_pChart.GetPrinter().ShowSetupDlg()) {
		int tmp = m_pChart.GetPanel().GetBevelOuter();
		m_pChart.GetPanel().SetBevelOuter(0);
		m_pChart.GetPrinter().PrintChart();
		m_pChart.GetPanel().SetBevelOuter(tmp);
	}
}
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

DVT
Newbie
Newbie
Posts: 10
Joined: Tue Nov 02, 2010 12:00 am

Re: Problem of Printing Axis' Labels and Titles

Post by DVT » Thu Dec 11, 2014 8:57 pm

Thanks. That works.

I tried printing my chart with setting the GDI+ to TRUE and FALSE. It looks nicer on the print out when setting the GDI+ to FALSE than setting it to TRUE. In what scenario is GDI+ supposed to be set to TRUE?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Problem of Printing Axis' Labels and Titles

Post by Yeray » Fri Dec 12, 2014 8:38 am

Hello,
DVT wrote:I tried printing my chart with setting the GDI+ to TRUE and FALSE. It looks nicer on the print out when setting the GDI+ to FALSE than setting it to TRUE. In what scenario is GDI+ supposed to be set to TRUE?
It's up to you. We find GDI+ draws smoother lines and texts but some customers find it blurry.
In general we'd probably use GDI+ to create visually attractive charts but GDI if the performance is in compromise. Also note OpenGL, that takes a bit to initialize but it's both pretty and fast after it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply