Title from bottom axis moves in preview window from print

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Eskimo17
Newbie
Newbie
Posts: 3
Joined: Wed Nov 06, 2013 12:00 am

Title from bottom axis moves in preview window from print

Post by Eskimo17 » Thu May 07, 2015 1:58 pm

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
Attachments
TeeChartPreview.png
Axis Title Top is missing and axis title Bottom is moved to left (Screenshot from the preview window)
TeeChartPreview.png (22.6 KiB) Viewed 4596 times
TeeChart.png
Axis titles should be like this (Screenshot from the window with component TeeChart)
TeeChart.png (18.58 KiB) Viewed 4589 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

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

Post by Christopher » Thu May 07, 2015 4:16 pm

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.
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply