Chart Printing - labels are not shown

TeeChart for ActiveX, COM and ASP
Post Reply
GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Chart Printing - labels are not shown

Post by GLSWG » Thu Mar 10, 2005 1:00 pm

niehter by ShowPreview() nor in actual printout. I'm using Custom Axis and they have respective text labels. The labels are set this way

Code: Select all

void CChartDataView::SetCustomLabels(CStringArray *arrLabelsText, CStringArray *arrValues, unsigned long nAxisType)
{
		CAxes cAxes= m_ctlTChart.GetAxis(); 
		
		CAxis cAxis;
		if (nAxisType=atBottom){
			 cAxis=cAxes.GetCustom(m_nCustomBottomAxisIndex); 
		}
		CAxisLabels cAxisLabels=cAxis.GetLabels();   
		
		cAxisLabels.Clear();
		
		for (int i=0; i<arrLabelsText->GetSize();i++ ){
			cAxisLabels.Add(atof(arrValues->GetAt(i)) ,arrLabelsText->GetAt(i)); 
			cAxisLabels.GetItem(i).GetFont().SetColor(RGB(255,255,255));  
		}
		
}
And the Print method looks like

Code: Select all

void CChartDataView::Print()
{
m_ctlTChart.GetPrinter().ShowPreview();  
//m_ctlTChart.GetPrinter().PrintChart(); 
 
}
Please, advice if there are any special considerations for chart printing in my case? Thank you in advance.

Regards,
Michael.

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

Post by Narcís » Mon Mar 14, 2005 10:22 am

Hello Michael,

It works fine here using the VC++ examples included with v6 ActiveX installation. Could you please have a look at them? You will find the examples at the so called entry in the TeeChart program group. One of those examples is printing specific as indicated by it's name. You can also test "TeeFiles" example, run it and double-click the chart, add a custom axis to the chart and try printing it.
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

GLSWG
Newbie
Newbie
Posts: 39
Joined: Fri Jan 09, 2004 5:00 am

Post by GLSWG » Mon Mar 28, 2005 11:57 am

Hi Narcis,

Thank you for your reply. But it won't work in example either. Here is example I used:
C:\Program Files\Steema Software\TeeChart Pro v6 ActiveX
Control\Examples\Visual C++\Version 6\Printing\

In the Print Preview all the labels from Axes as well as text "Header Text" and "Footer Comment" are disappeared. Is there any specific reason for that? Thank you for an ideas or help.

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

Post by Narcís » Tue Mar 29, 2005 9:03 am

Hi Michael,

It's strange as it works fine for me.

There are 2 options for doing a print preview on this example:

1) File Menu\Print Preview.
2) TeeChart Menu\Editor\Print tab.

Could you please check if the problem you reported happens in both options as they are pretty different?

Also, have you tried printing the chart, does this also happens?

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

Post Reply