Changing AngleIncrement has no effect

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Christo Zietsman
Newbie
Newbie
Posts: 34
Joined: Thu Sep 04, 2008 12:00 am

Changing AngleIncrement has no effect

Post by Christo Zietsman » Thu Mar 05, 2009 2:05 pm

I'm using TeeChart.WPF 3.5.3317.17532.

It seems that AngleIncrement doesn't have any effect anymore.

I've set it quite large, but to no avail.
series.AngleIncrement = 90; // 90 degrees increments


<Window x:Class="WPFDemo.Window5"
xmlns="http://schemas.microsoft.com/winfx/2006 ... esentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WPF="clr-namespace:Steema.TeeChart.WPF;assembly=TeeChart.WPF"
Title="Window5" Height="600" Width="800">
<WPF:TChart Grid.Row="1" x:Name="chart"/>
</Window>

public partial class Window5
{
public Window5()
{
InitializeComponent();
chart.SnapsToDevicePixels = true;
chart.Aspect.View3D = false;
chart.Axes.Left.Automatic = false;
chart.Axes.Left.AutomaticMinimum = false;
chart.Axes.Left.AutomaticMaximum = false;
chart.Axes.Left.Minimum = 0;
chart.Axes.Left.Maximum = 1;

Polar series = new Polar();
series.CircleLabels = true;
series.Circled = true;
series.AngleIncrement = 90; // 90 degrees increments
series.Add(0, 1.0 / Math.Sqrt(2));
series.Add(45, 1);

chart.Series.Add(series);
}
}

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Mar 05, 2009 3:45 pm

Hi Christo,

It works fine adding Polar series to the chart like this:

Code: Select all

			Polar series = new Polar(chart.Chart);
For example:

Code: Select all

		public void initChart4(TChart chart, Label label)
		{
			setupChart(chart);
			label.Content = "BEFORE adding data:\nseries.ClockWiseLabels = true;";

			Polar series = new Polar(chart.Chart);
			setupPolar(series);

			series.RotationAngle = 90;
			series.ClockWiseLabels = true;

			series.Add(0, 1.0 / Math.Sqrt(2));
			series.Add(45, 1);

			//chart.Series.Add(series);
		}
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Christo Zietsman
Newbie
Newbie
Posts: 34
Joined: Thu Sep 04, 2008 12:00 am

Post by Christo Zietsman » Fri Mar 06, 2009 6:26 am

Setting series.AngleIncrement after chart.Series.Add(series) seems to work.

Is this the general philosophy? Should I always apply settings after the series was added to the chart or should I test settings case by case?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Mar 06, 2009 11:04 am

Hi Christo,

No, this is a particular case. AngleIncrement sets series' GetHorizAxis.Increment property. Since this axis doesn't exist in the chart as no series has been added to the chart it doesn't work. That's the reason why you need to add the series to the chart before setting this property. Both options below work fine:

Code: Select all

			Steema.TeeChart.Styles.Polar polar1 = new Steema.TeeChart.Styles.Polar(tChart1.Chart);

			polar1.AngleIncrement = 30;
			polar1.FillSampleValues();			

Code: Select all

			Steema.TeeChart.Styles.Polar polar1 = new Steema.TeeChart.Styles.Polar();
			tChart1.Series.Add(polar1);

			polar1.AngleIncrement = 30;
			polar1.FillSampleValues();			
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply