TeeChart.Silverlight: Legend & Axis Label Placement

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
cjherasmus
Newbie
Newbie
Posts: 5
Joined: Mon Jan 09, 2017 12:00 am

TeeChart.Silverlight: Legend & Axis Label Placement

Post by cjherasmus » Wed Jun 28, 2017 1:42 pm

Hi,

please find attached a screen image of the situation I'm currently experiencing. My development environment is Windows 7, Silverlight 4.0 and VS 2012.

I would like to have the legend moved lower not to overlap the datetime x-axis label values.

I would also like to have the right axis title moved up (centered) and a bit to the right.

Text alignment, Legend alignment and label alignment doesn't help much.

Thank you
Regards
Attachments
steema-placement.jpg
steema-placement.jpg (349.51 KiB) Viewed 11707 times

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

Re: TeeChart.Silverlight: Legend & Axis Label Placement

Post by Christopher » Thu Jun 29, 2017 9:11 am

Hello,

Running the following code using the latest version of TeeChart.Silverlight.dll:

Code: Select all

    public MainPage()
    {
      InitializeComponent();

      TChart tChart1 = new TChart();
      tChart1.Margin = new Thickness(0);
      LayoutRoot.Children.Add(tChart1);

      tChart1.Series.Add(typeof(Histogram)).FillSampleValues();
      tChart1.Series.Add(typeof(Candle)).FillSampleValues();

      tChart1.Axes.Bottom.Labels.Angle = 90;
      tChart1[1].VertAxis = VerticalAxis.Right;
      tChart1[0].HorizAxis = HorizontalAxis.Top;
      tChart1.Legend.Alignment = LegendAlignments.Bottom;
      tChart1.Axes.Right.Title.Text = "Right Axis Title";
      tChart1.Axes.Right.Title.Angle = 90;
      tChart1.Axes.Right.Labels.CustomSize = 100;

      tChart1.Panel.MarginRight = 30;
    }
gives me the following output:
labelslegend.PNG
labelslegend.PNG (32.17 KiB) Viewed 11695 times
do you get the same result using this code?
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

cjherasmus
Newbie
Newbie
Posts: 5
Joined: Mon Jan 09, 2017 12:00 am

Re: TeeChart.Silverlight: Legend & Axis Label Placement

Post by cjherasmus » Mon Jul 03, 2017 6:41 am

Thank you Christopher,

The combination of the Angle and Custom Size did the trick for the right-side y-axis title. The bottom legend overlapping is still overlapping.

I'm using version 4.1.2016.10260 with the Silverlight dll of the .NET 3.5 version.

Can't find the Silverlight dll in the 4.1.2017.0314 version.

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

Re: TeeChart.Silverlight: Legend & Axis Label Placement

Post by Christopher » Mon Jul 03, 2017 2:21 pm

Hello,

Using the TeeChart.Silverlight.dll under:
Steema Software\Steema TeeChart for .NET 2016 4.1.2016.10260\net35\x86\TeeChart.Silverlight.dll

I obtain a similar result using the previous code:
Silverlight.PNG
Silverlight.PNG (30.25 KiB) Viewed 11699 times
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

cjherasmus
Newbie
Newbie
Posts: 5
Joined: Mon Jan 09, 2017 12:00 am

Re: TeeChart.Silverlight: Legend & Axis Label Placement

Post by cjherasmus » Tue Jul 04, 2017 6:31 am

Hi Christopher,

I've run your code successfully and works correct.

In my code I get an error message: "Value does not fall within the expected range" which appears when I set the Legend Alignment to Bottom. When I use your code to fit into my coding I get the error again. It seems that my problem occurs before I'm drawing the chart and the way I'm doing it. I will have to go investigate.

Thank you for your assistance thus far.

Post Reply