Subtle issue when adding more than one smith series to chart
Posted: Tue Oct 07, 2008 2:06 pm
I've added two smith series to a chart. The first series I set the Circled property to true. The second series I didn't and the point did not plot correctly (where I expected it to be). Is this the expected behaviour / learing curve for the API? I had to make a separate demo to isolate the problem.
XAML to display example:
The code behind:
XAML to display example:
Code: Select all
<Window x:Class="WPFDemo.SmithWindow3"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WPF="clr-namespace:Steema.TeeChart.WPF;assembly=TeeChart.WPF"
Title="Window2" Width="800" Height="600">
<Grid>
<WPF:TChart Margin="0,0,0,0" Name="Chart" />
</Grid>
</Window>
Code: Select all
using System.Windows;
using Steema.TeeChart.WPF.Styles;
namespace WPFDemo
{
/// <summary>
/// Interaction logic for SmithWindow3.xaml
/// </summary>
public partial class SmithWindow3 : Window
{
public SmithWindow3()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
Chart.Aspect.View3D = false;
Smith smith = new Smith();
smith.Pointer.Brush.Visible = false;
smith.Pointer.Pen.Visible = false;
smith.Circled = true;
smith.Add(0.79179995592949659, 0.14388594764063792);
smith.Add(0.8647277042181758, -0.0081370575495096509);
smith.Add(0.8524625931032126, -0.17622440105160339);
smith.Add(0.767156825803257, -0.30612640281506492);
smith.Add(0.6506441001998764, -0.37464735034203056);
Chart.Series.Add(smith);
Smith smith2 = new Smith();
/// If we uncomment this, then the second series's point is placed correctly
//smith2.Circled = true;
smith2.Add(0.8524625931032126, -0.17622440105160339);
Chart.Series.Add(smith2);
}
}
}