Problems with horizontal area series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Alexey I.
Newbie
Newbie
Posts: 3
Joined: Wed Apr 13, 2005 4:00 am
Location: Russian Federation

Problems with horizontal area series

Post by Alexey I. » Thu May 19, 2005 5:53 am

1) I use series option "Color Each" and add points to this series with method "Add(X, Y, Color);". This ends with exception on draw.
I solve this problem by separating up data in several "single colored" series.

2) When scrolling series at runtime, element of series disappears, when part of this element moves out of the chart workarea.

Code: Select all

series.Add(0, top);
series.Add(value, top);
series.Add(value, bottom);
series.Add(0, bottom);
I think that it depends on inverted Y axis. After I changed code to this:

Code: Select all

series.Add(0, bottom);
series.Add(value, bottom);
series.Add(value, top);
series.Add(0, top);
this problem disappears, but Click and DoubleClick events of other series (Shape series) stop works.
Please tell me, how to add such elements correctly (when Y axis is inverted).

3) In horizontal area series often elements (in start of series), such as described in (2) looks incorrect.
When I use code

Code: Select all

series.Add(0, 200);
series.Add(100, 200);
series.Add(100, 300);
series.Add(0, 300);
I can see dislocated rectangle approximately in 4 - 104 X values.
This bug is very serios and need to be fixed immediately !



Version of TeeChart .NET (1.1.1879.21176)

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 May 19, 2005 8:39 am

Hi Alexey,
1) I use series option "Color Each" and add points to this series with method "Add(X, Y, Color);". This ends with exception on draw.
I solve this problem by separating up data in several "single colored" series.
I haven't been able to reproduce this problem here. Could you please send us an example project we can run "as-is" to reproduce the problem here? You can post it at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Regarding questions 2 and 3, could you also reproduce them in the example project as I don't understand the problems very well?

Thanks in advance.
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

Alexey I.
Newbie
Newbie
Posts: 3
Joined: Wed Apr 13, 2005 4:00 am
Location: Russian Federation

Post by Alexey I. » Thu May 19, 2005 11:05 am

Hi Narcis,
I can't send you my project, because NNTP protocol is closed.
Try this C# code:

Code: Select all

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace TestChart
{
	public class Form1 : System.Windows.Forms.Form
	{
		private Steema.TeeChart.TChart tChart1;
		private Steema.TeeChart.Styles.HorizArea horizArea1;
		private System.ComponentModel.Container components = null;

		public Form1()
		{
			InitializeComponent();
		}

		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		private void InitializeComponent()
		{
			this.tChart1 = new Steema.TeeChart.TChart();
			this.horizArea1 = new Steema.TeeChart.Styles.HorizArea();
			this.SuspendLayout();
			this.tChart1.Aspect.View3D = false;
			this.tChart1.Axes.Left.Inverted = true;
			this.tChart1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.tChart1.Header.Lines = new string[] {"TeeChart"};
			this.tChart1.Location = new System.Drawing.Point(0, 0);
			this.tChart1.Name = "tChart1";
			this.tChart1.Series.Add(this.horizArea1);
			this.tChart1.Size = new System.Drawing.Size(648, 478);
			this.tChart1.TabIndex = 0;
			this.horizArea1.AreaBrush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(255)), ((System.Byte)(0)), ((System.Byte)(0)));
			this.horizArea1.AreaBrush.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
			this.horizArea1.AreaLines.Visible = false;
			this.horizArea1.Brush.Color = System.Drawing.Color.Red;
			this.horizArea1.ColorEach = true;
			this.horizArea1.Gradient.Direction = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;
			this.horizArea1.LinePen.Visible = false;
			this.horizArea1.MultiArea = Steema.TeeChart.Styles.MultiAreas.Stacked;
			this.horizArea1.Pointer.Brush.Color = System.Drawing.Color.FromArgb(((System.Byte)(254)), ((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
			this.horizArea1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
			this.horizArea1.ShowInLegend = false;
			this.horizArea1.Stacked = Steema.TeeChart.Styles.CustomStack.Stack;
			this.horizArea1.Title = "horizArea1";
			this.horizArea1.YValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(648, 478);
			this.Controls.Add(this.tChart1);
			this.Name = "Form1";
			this.Text = "Form1";
			this.Load += new System.EventHandler(this.Form1_Load);
			this.ResumeLayout(false);

		}
		#endregion

		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void Form1_Load(object sender, System.EventArgs e)
		{
			horizArea1.Add(0, 50, Color.Red);
			horizArea1.Add(100, 50, Color.Red);
			horizArea1.Add(100, 100, Color.Red);
			horizArea1.Add(0, 100, Color.Red);

			horizArea1.Add(0, 130, Color.Green);
			horizArea1.Add(70, 130, Color.Green);
			horizArea1.Add(70, 180, Color.Green);
			horizArea1.Add(0, 180, Color.Green);

			horizArea1.Add(0, 200, Color.Gray);
			horizArea1.Add(90, 200, Color.Gray);
			horizArea1.Add(90, 210, Color.Gray);
			horizArea1.Add(0, 210, Color.Gray);

		}

		
	}
}
After run this application you can see "System.ArgumentOutOfRangeException".

Best regards,
Alexey I. from Russia

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 May 19, 2005 11:58 am

Hi Alexey,

I've been able to reproduce it and the problem was inverted axis. This is a bug which has already been fixed for our next releases.
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

Alexey I.
Newbie
Newbie
Posts: 3
Joined: Wed Apr 13, 2005 4:00 am
Location: Russian Federation

Post by Alexey I. » Fri May 20, 2005 10:18 am

Hi Narcis,

When can I get this release ?

Best regards,
Alexey I.

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 May 20, 2005 11:18 am

Hi Alexey,

It will be available shortly. Please stay tunned to our customer download area or this forums.
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