When the TeeChart is exported as a PDF, the font size of the axes is not scaled correctly, even when a larger font size is set. In contrast, when the chart is exported as a PNG image, everything is displayed and scaled correctly.
The attachment includes both the PNG and PDF exports, each shown with and without scaling enabled. Only the PNG export reflects the correct font scaling, while the PDF export does not apply the scaling to the axis labels.
Code snippet for setting the scale:
private void SetFontSize(double size)
{
for (int i = 0; i < MyTeeChart.Chart.Axes.Custom.Count; i++)
{
if (MyTeeChart.Chart.Axes.Custom[i].Visible)
{
MyTeeChart.Chart.Axes.Custom[i].Labels.Font.SizeFloat = (float)size;
MyTeeChart.Chart.Axes.Custom[i].Title.Font.SizeFloat = (float)size;
}
}
}
and
MyTeeChart.Chart.Export.Image.PDF.Height = pSettings.PrintHeight;
MyTeeChart.Chart.Export.Image.PDF.Width = pSettings.PrintWidth;
MyTeeChart.Chart.Export.Image.PDF.Save(pathWithFilename);
or
PNGFormat png = MyTeeChart.Chart.Export.Image.PNG;
png.Height = pSettings.PrintHeight;
png.Width = pSettings.PrintWidth;
png.Save(pathWithFilename);


