Chart Printing - labels are not shown
Posted: 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
And the Print method looks like
Please, advice if there are any special considerations for chart printing in my case? Thank you in advance.
Regards,
Michael.
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));
}
}
Code: Select all
void CChartDataView::Print()
{
m_ctlTChart.GetPrinter().ShowPreview();
//m_ctlTChart.GetPrinter().PrintChart();
}
Regards,
Michael.