Page 1 of 1

Smith: Adding markers causes series to move

Posted: Thu Oct 09, 2008 9:58 am
by 13050248
I've uploaded two images:
1. p1.PNG Length 51588
2. p2.PNG Length 49753

These two images shows what happens when I:
1. have the two lines to show marks commented out
2. include the tow lines to show marks.

I have two issues:

The first and most important issue is that the second series does not render correctly on the chart when the marks are shown.

The second issue is that when we show the marks the smith chart area is smaller than when we don't. Look at the space difference between the header text and the top of the chart area.

The xaml:

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>

The code behind:

Code: Select all

using System;
using System.Windows;
using System.Windows.Media;
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);

            // uncomment these two lines to turn the marks off
            smith.Marks.Visible = true;
            smith.Marks.DrawEvery = 2;   
            Chart.Series.Add(smith);

            Smith smith2 = new Smith();
            smith2.Circled = true;
            smith2.Pointer.Color = Colors.Black;
            smith2.Pointer.Style = PointerStyles.Cross;
            smith2.Add(0.8524625931032126, -0.17622440105160339);
            Chart.Series.Add(smith2);

            double[] realValues = 
            {
                0.5,
                1,
                2,
                1,
                0.5
            };

            double[] imagValues = 
            {
                0,
                -0.75,
                0,
                0.75,
                0
            };

            Smith smith3 = new Smith();
            smith3.Circled = true;
            smith3.ImagSymbol = "i";
            smith3.Pointer.Style = PointerStyles.Nothing;
            smith3.Add(realValues, imagValues);
            Chart.Series.Add(smith3);
        }
    }
}

Posted: Thu Oct 09, 2008 11:18 am
by narcis
Hi Christo,

Thanks for the information. I could reproduce the issue here and added it (TF02013442) to the defect list to be fixed for next releases.

Posted: Fri Oct 10, 2008 8:12 am
by 13050248
Thanks NarcĂ­s,

I think the same issue is also applicable to polar series.

Posted: Fri Oct 10, 2008 9:07 am
by narcis
Hi Christo,

Thanks for the information. Most likely this is a problem in base series class (Steema.TeeChart.Styles.Circular).