Page 1 of 1

Chart Printing - labels are not shown

Posted: Thu Mar 10, 2005 1:00 pm
by 9080443
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.

Posted: Mon Mar 14, 2005 10:22 am
by narcis
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.

Posted: Mon Mar 28, 2005 11:57 am
by 9080443
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.

Posted: Tue Mar 29, 2005 9:03 am
by narcis
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.