Page 1 of 1

TeeChart.Silverlight: Legend & Axis Label Placement

Posted: Wed Jun 28, 2017 1:42 pm
by 15679888
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

Re: TeeChart.Silverlight: Legend & Axis Label Placement

Posted: Thu Jun 29, 2017 9:11 am
by Christopher
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 11662 times
do you get the same result using this code?

Re: TeeChart.Silverlight: Legend & Axis Label Placement

Posted: Mon Jul 03, 2017 6:41 am
by 15679888
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.

Re: TeeChart.Silverlight: Legend & Axis Label Placement

Posted: Mon Jul 03, 2017 2:21 pm
by Christopher
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 11666 times

Re: TeeChart.Silverlight: Legend & Axis Label Placement

Posted: Tue Jul 04, 2017 6:31 am
by 15679888
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.