0 values not shown in line series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
AndreAtDeltares
Newbie
Newbie
Posts: 7
Joined: Fri May 25, 2007 12:00 am
Location: Delft
Contact:

0 values not shown in line series

Post by AndreAtDeltares » Wed Aug 20, 2008 11:42 am

Hi all,

The following code does not display the first point on my PC when the Y value of this point is 0.0, but does so when the value is 0.00001. On the PC of my co-worker it does. Both using VS 2005 and TeeChart 3.5. Any ideas?

André Hendriks
Deltares

Code: Select all

        public Form1()
        {
            InitializeComponent();

            double?[] X = new double?[] { 0.0, 1.0, 3.0 };
            //double?[] Y = new double?[] { 0.000001, 1.0, 1.0 };
            double?[] Y = new double?[] { 0.0, 1.0, 1.0 };

            TChart c = new TChart();
            c.Dock = DockStyle.Fill;
            c.Aspect.View3D = false;

            c.Axes.Left.Automatic = false;
            c.Axes.Left.SetMinMax(-0.1, 1.1);
            c.Axes.Bottom.Automatic = false;
            c.Axes.Bottom.SetMinMax(-0.5, 3.5);

            Steema.TeeChart.Styles.Line l = new Steema.TeeChart.Styles.Line(c.Chart);
            l.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
            l.Pointer.HorizSize = l.Pointer.VertSize = 3;
            l.Pointer.Visible = true;
            l.Add(X, Y);

            this.Controls.Add(c);
        }

Pep
Site Admin
Site Admin
Posts: 3303
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 21, 2008 10:18 am

Hello André,

you're correct, I've been able to reproduce the problem here using the latest release. It's a bug, it seems only happens trying to add data arrays directly to the Series. It has been added on our defect list and a fix for it will be considered to inclusion in one of the next maintenance releases.

As a workaround you could iterate through the arrays and add data using Add method :

l.Add(X[0], Y[0]);

Post Reply