Page 1 of 1

Title from bottom axis moves in preview window from print

Posted: Thu May 07, 2015 1:58 pm
by 15667696
Hello,

when I change in the print preview the orientation from Landscape to Portrait mode, the title from the bottom axis moves to the left. If I change back to Landscape mode, the title moves again left. After a few repeats on this step the title is not visible anymore (moved left away).
I have also a title for the top axis defined, which I see on my TeeChart but I don't see it in the preview window from the printer. See the screenshots TeeChart.png which looks right and the screenshot TeeChartPreview.png which has no axis title top and the axis title bottom is moved to the left
I use the property AutoPostion as false, and set the top and left Property to values from the title from the axis.
Used is TeeChart version Steema TeeChart for .NET 2015 4.1.2015.03110

I use quit the same code as in [http://www.teechart.net/support//viewto ... =4&t=13686] with title Basic how to do ... the last code example.

Here is my code snippet for the preview, the axes and the axes title are set before:

Code: Select all


if (MyTeeChart.Axes.Bottom.Visible)
{	
      // Bottom
      MyTeeChart.Chart.Axes.Bottom.Labels.MultiLine = true;
      MyTeeChart.Chart.Axes.Bottom.Labels.Font.SizeFloat = (float)fontSize;

      MyTeeChart.Chart.Axes.Bottom.Title.AutoPosition = false;
      MyTeeChart.Chart.Axes.Bottom.Title.Top = Utils.Round(MyTeeChart.Height - (float)fontSize * 2.0);
      MyTeeChart.Chart.Axes.Bottom.Title.Left = MyTeeChart.Width / 2 -
             Utils.Round(MyTeeChart.Graphics3D.TextWidth(MyTeeChart.Axes.Bottom.Title.Text) / 2) +
             MyTeeChart.Axes.Left.MaxLabelsWidth();
      MyTeeChart.Chart.Panel.MarginBottom = 3 * (float)fontSize;
}

if (MyTeeChart.Axes.Top.Visible)
{
       // Top
       MyTeeChart.Chart.Axes.Top.Labels.MultiLine = true;
       MyTeeChart.Chart.Panel.MarginTop = 3 * (float)fontSize;
					
        MyTeeChart.Chart.Axes.Top.Title.AutoPosition = false;
        MyTeeChart.Chart.Axes.Top.Title.Top = Utils.Round(fontSize * 2.0);
        MyTeeChart.Chart.Axes.Top.Title.Left = MyTeeChart.Width / 2 - 
		    Utils.Round(MyTeeChart.Graphics3D.TextWidth(MyTeeChart.Axes.Bottom.Title.Text) / 2) +
		    MyTeeChart.Axes.Left.MaxLabelsWidth(); 
}

if (showPrintDialog)
{
    MyTeeChart.Printer.Grayscale = printGreyScale; 
    MyTeeChart.Printer.Landscape = landscape; 
    MyTeeChart.Printer.Preview();
}
else
{
     MyTeeChart.Printer.Grayscale = printGreyScale;
     MyTeeChart.Printer.Landscape = landscape;
     MyTeeChart.Printer.Print();
}

Any suggestions ?

Regards
T. Harder

Re: Title from bottom axis moves in preview window from print

Posted: Thu May 07, 2015 4:16 pm
by Christopher
Hello,
Eskimo17 wrote:Any suggestions ?
This is a defect which I've added to our database with id=1204. A maintenance release is due out very shortly, and we shall do our best to fix this problem for it.