Problems loading/compiling a cs-file that contains teeChart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
SurveyBob
Newbie
Newbie
Posts: 22
Joined: Mon Dec 14, 2009 12:00 am

Problems loading/compiling a cs-file that contains teeChart

Post by SurveyBob » Mon Jan 18, 2010 4:31 pm

Hello,

I created a cs file that contains a teeChart - contour- object ( Windows XP, Visual Studio 2008). Editing (right click on the object, edit, change one property) the control in design mode leads to VS to get stuck in "Not responding" mode.
Saving the file that contains the teeChart object leads to large cpu usage and eventually low memory of VS.
The teeChart version I am using is 4.0.2009.42283

Code: Select all

private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager( typeof( ContourMap ) );
			this.tChart1 = new Steema.TeeChart.TChart();
			this.contour1 = new Steema.TeeChart.Styles.Contour();
			this.points1 = new Steema.TeeChart.Styles.Points();
			this.SuspendLayout();
			// 
			// tChart1
			// 
			// 
			// 
			// 
			this.tChart1.Aspect.View3D = false;
			this.tChart1.Aspect.ZOffset = 0;
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			this.tChart1.Axes.Bottom.Grid.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 64 ) ) ) ), ( (int) ( ( (byte) ( 64 ) ) ) ), ( (int) ( ( (byte) ( 64 ) ) ) ) );
			// 
			// 
			// 
			this.tChart1.Axes.Bottom.Labels.OnAxis = false;
			this.tChart1.Axes.Bottom.Labels.RoundFirstLabel = false;
			this.tChart1.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value;
			this.tChart1.Axes.Bottom.Labels.ValueFormat = "0.0";
			this.tChart1.Axes.Bottom.MaximumOffset = 4;
			this.tChart1.Axes.Bottom.MinimumOffset = 4;
			this.tChart1.Axes.Bottom.MinorTickCount = 1;
			this.tChart1.Axes.Bottom.StartPosition = 3;
			// 
			// 
			// 
			this.tChart1.Axes.Bottom.TicksInner.Visible = true;
			// 
			// 
			// 
			this.tChart1.Axes.Bottom.Title.Transparent = true;
			this.tChart1.Axes.Bottom.Title.Visible = false;
			// 
			// 
			// 
			// 
			// 
			// 
			this.tChart1.Axes.Depth.Title.Transparent = true;
			// 
			// 
			// 
			// 
			// 
			// 
			this.tChart1.Axes.DepthTop.Title.Transparent = true;
			this.tChart1.Axes.DrawBehind = false;
			// 
			// 
			// 
			// 
			// 
			// 
			this.tChart1.Axes.Left.Labels.OnAxis = false;
			this.tChart1.Axes.Left.MaximumOffset = 4;
			this.tChart1.Axes.Left.MinimumOffset = 4;
			this.tChart1.Axes.Left.StartPosition = 3;
			// 
			// 
			// 
			this.tChart1.Axes.Left.Title.Transparent = true;
			// 
			// 
			// 
			// 
			// 
			// 
			this.tChart1.Axes.Right.Title.Transparent = true;
			this.tChart1.Axes.Right.Visible = false;
			// 
			// 
			// 
			this.tChart1.Axes.Top.Automatic = false;
			this.tChart1.Axes.Top.AutomaticMaximum = false;
			this.tChart1.Axes.Top.AutomaticMinimum = false;
			this.tChart1.Axes.Top.Maximum = 0;
			this.tChart1.Axes.Top.Minimum = 0;
			// 
			// 
			// 
			this.tChart1.Axes.Top.Title.Transparent = true;
			this.tChart1.Cursor = System.Windows.Forms.Cursors.Default;
			this.tChart1.Dock = System.Windows.Forms.DockStyle.Fill;
			// 
			// 
			// 
			this.tChart1.Header.Lines = new string[] {
        "Contour map"};
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			this.tChart1.Legend.Font.Brush.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ) );
			this.tChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Values;
			this.tChart1.Legend.TextStyle = Steema.TeeChart.LegendTextStyles.Value;
			this.tChart1.Location = new System.Drawing.Point( 0, 0 );
			this.tChart1.Name = "tChart1";
			this.tChart1.Series.Add( this.contour1 );
			this.tChart1.Series.Add( this.points1 );
			this.tChart1.Size = new System.Drawing.Size( 813, 807 );
			this.tChart1.TabIndex = 0;
			// 
			// contour1
			// 
			// 
			// 
			// 
			this.contour1.Brush.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 68 ) ) ) ), ( (int) ( ( (byte) ( 102 ) ) ) ), ( (int) ( ( (byte) ( 163 ) ) ) ) );
			this.contour1.Brush.Visible = false;
			this.contour1.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 68 ) ) ) ), ( (int) ( ( (byte) ( 102 ) ) ) ), ( (int) ( ( (byte) ( 163 ) ) ) ) );
			this.contour1.ColorEach = false;
			this.contour1.Cursor = System.Windows.Forms.Cursors.No;
			this.contour1.EndColor = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ) );
			this.contour1.IrregularGrid = true;
			// 
			// 
			// 
			// 
			// 
			// 
			this.contour1.Marks.Bevel.ColorTwo = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 128 ) ) ) ), ( (int) ( ( (byte) ( 128 ) ) ) ), ( (int) ( ( (byte) ( 128 ) ) ) ) );
			// 
			// 
			// 
			this.contour1.Marks.Brush.Visible = false;
			// 
			// 
			// 
			this.contour1.Marks.Callout.ArrowHead = Steema.TeeChart.Styles.ArrowHeadStyles.None;
			this.contour1.Marks.Callout.ArrowHeadSize = 8;
			// 
			// 
			// 
			this.contour1.Marks.Callout.Brush.Color = System.Drawing.Color.Black;
			this.contour1.Marks.Callout.Distance = 0;
			this.contour1.Marks.Callout.Draw3D = false;
			this.contour1.Marks.Callout.Length = 10;
			this.contour1.Marks.Callout.Series = this.contour1;
			this.contour1.Marks.Callout.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
			this.contour1.Marks.Callout.Visible = false;
			this.contour1.Marks.DrawEvery = 3;
			this.contour1.Marks.Series = this.contour1;
			this.contour1.Marks.Transparent = true;
			this.contour1.Marks.Visible = true;
			this.contour1.MidColor = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 128 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 128 ) ) ) ) );
			this.contour1.NumLevels = 12;
			this.contour1.NumXValues = 490;
			this.contour1.NumZValues = 490;
			this.contour1.PaletteMin = 0;
			this.contour1.PaletteStep = 0;
			this.contour1.PaletteSteps = 12;
			this.contour1.PaletteStyle = Steema.TeeChart.Styles.PaletteStyles.Pale;
			// 
			// 
			// 
			this.contour1.Pen.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ) );
			// 
			// 
			// 
			this.contour1.Pointer.HorizSize = 2;
			// 
			// 
			// 
			this.contour1.Pointer.Pen.Visible = false;
			this.contour1.Pointer.Series = this.contour1;
			this.contour1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
			this.contour1.Pointer.VertSize = 2;
			this.contour1.Pointer.Visible = false;
			this.contour1.StartColor = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ) );
			this.contour1.TimesZOrder = 5;
			this.contour1.Title = "contour1";
			this.contour1.ValueFormat = "0.0";
			// 
			// 
			// 
			this.contour1.XValues.DataMember = "X";
			this.contour1.YPosition = 0.20322339899792125;
			// 
			// 
			// 
			this.contour1.YValues.DataMember = "Y";
			// 
			// 
			// 
			this.contour1.ZValues.DataMember = "Z";
			// 
			// points1
			// 
			this.points1.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 128 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ) );
			this.points1.ColorEach = false;
			this.points1.Cursor = System.Windows.Forms.Cursors.SizeAll;
			this.points1.Depth = 0;
			// 
			// 
			// 
			this.points1.LinePen.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 146 ) ) ) ), ( (int) ( ( (byte) ( 94 ) ) ) ), ( (int) ( ( (byte) ( 32 ) ) ) ) );
			// 
			// 
			// 
			this.points1.Marks.ArrowLength = 9;
			// 
			// 
			// 
			this.points1.Marks.Bevel.ColorOne = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ) );
			this.points1.Marks.Bevel.ColorTwo = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ) );
			// 
			// 
			// 
			this.points1.Marks.Brush.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ) );
			this.points1.Marks.Brush.Visible = false;
			// 
			// 
			// 
			this.points1.Marks.Callout.ArrowHead = Steema.TeeChart.Styles.ArrowHeadStyles.None;
			this.points1.Marks.Callout.ArrowHeadSize = 8;
			// 
			// 
			// 
			this.points1.Marks.Callout.Brush.Color = System.Drawing.Color.Black;
			this.points1.Marks.Callout.Dark3D = false;
			this.points1.Marks.Callout.Distance = 0;
			this.points1.Marks.Callout.Draw3D = false;
			this.points1.Marks.Callout.InflateMargins = false;
			this.points1.Marks.Callout.Length = 9;
			this.points1.Marks.Callout.Series = this.points1;
			this.points1.Marks.Callout.Style = Steema.TeeChart.Styles.PointerStyles.Rectangle;
			this.points1.Marks.Callout.Visible = false;
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			this.points1.Marks.Font.Shadow.Brush.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ) );
			this.points1.Marks.Font.Shadow.Smooth = true;
			this.points1.Marks.Font.Shadow.SmoothBlur = 9;
			// 
			// 
			// 
			this.points1.Marks.Pen.Visible = false;
			this.points1.Marks.Series = this.points1;
			// 
			// 
			// 
			this.points1.Marks.Shadow.Visible = false;
			this.points1.Marks.ShapeStyle = Steema.TeeChart.Drawing.TextShapeStyle.RoundRectangle;
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			// 
			this.points1.Marks.Symbol.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 255 ) ) ) ) );
			this.points1.Marks.Symbol.Brush.Gradient.Visible = true;
			// 
			// 
			// 
			this.points1.Marks.Symbol.Shadow.Visible = false;
			this.points1.Marks.Transparent = true;
			this.points1.Marks.Visible = true;
			this.points1.PercentFormat = "";
			// 
			// 
			// 
			// 
			// 
			// 
			this.points1.Pointer.Brush.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 128 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ) );
			this.points1.Pointer.Brush.ForegroundColor = System.Drawing.Color.Empty;
			// 
			// 
			// 
			this.points1.Pointer.Brush.Gradient.StartColor = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 243 ) ) ) ), ( (int) ( ( (byte) ( 156 ) ) ) ), ( (int) ( ( (byte) ( 53 ) ) ) ) );
			this.points1.Pointer.Dark3D = false;
			this.points1.Pointer.Draw3D = false;
			this.points1.Pointer.HorizSize = 3;
			// 
			// 
			// 
			this.points1.Pointer.Pen.Color = System.Drawing.Color.FromArgb( ( (int) ( ( (byte) ( 255 ) ) ) ), ( (int) ( ( (byte) ( 128 ) ) ) ), ( (int) ( ( (byte) ( 0 ) ) ) ) );
			this.points1.Pointer.Series = this.points1;
			this.points1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle;
			this.points1.Pointer.VertSize = 3;
			this.points1.ShowInLegend = false;
			this.points1.Title = "points1";
			this.points1.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.Ignore;
			// 
			// 
			// 
			this.points1.XValues.DataMember = "X";
			this.points1.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.Ascending;
			// 
			// 
			// 
			this.points1.YValues.DataMember = "Y";
			// 
			// ContourMap
			// 
			this.Controls.Add( this.tChart1 );
			this.Name = "ContourMap";
			this.Size = new System.Drawing.Size( 813, 807 );
			this.ResumeLayout( false );
Thank you very much in advanced,

Stephan

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

Re: Problems loading/compiling a cs-file that contains teeChart

Post by Narcís » Tue Jan 19, 2010 4:02 pm

Hello Stephan,

Could you please attach a simple example project we can run "as-is" and/or let us know the exact steps we should follow to recreate the issue here?

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

SurveyBob
Newbie
Newbie
Posts: 22
Joined: Mon Dec 14, 2009 12:00 am

Re: Problems loading/compiling a cs-file that contains teeChart

Post by SurveyBob » Thu Jan 21, 2010 10:39 am

Hello Narcis,
All I did was adding a TeeChart to a new Windows-Form, adding a contour series (2D) to the TeeChart and saved it. Following error message kept popping up every second.

---------------------------
Microsoft Visual Studio
---------------------------
Code generation for property 'Levels' failed. Error was: 'Type 'Steema.TeeChart.Styles.ContourLevel' in Assembly 'TeeChart, Version=2.0.2652.22325, Culture=neutral, PublicKeyToken=9c8126276c77bdb7' is not marked as serializable.'
---------------------------
OK
---------------------------

I saw this a few times also an different mashines.

Best regards,

Stephan

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

Re: Problems loading/compiling a cs-file that contains teeChart

Post by Narcís » Thu Jan 21, 2010 11:19 am

Hi Stephan,

I'm not able to reproduce this here using latest TeeChart for .NET v2 build available at the client area. Can you please check if latest version available solves the problem at your end?

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

SurveyBob
Newbie
Newbie
Posts: 22
Joined: Mon Dec 14, 2009 12:00 am

Re: Problems loading/compiling a cs-file that contains teeChart

Post by SurveyBob » Wed Jan 27, 2010 1:37 pm

Hi Narcís,
I attached a stand alone solution which is able to reproduce the issue. I had the lastest version ( 4.0.2009.42283) installed.

Best regards,

Stephan

FYI, the error message I posted earlier has been cause by the fact, that I had 2 version of teeChart installed on my machine.
I removed the earlier one and the message was gone
Attachments
TeeChartTestSolution.zip
(19.92 KiB) Downloaded 428 times

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Problems loading/compiling a cs-file that contains teeChart

Post by Sandra » Thu Jan 28, 2010 10:53 am

Hello SurveyBob,

I couldn't reproduce the problem here using last version of TeeChart.Net. Please you can say exactly what steps we must to reproduce the error?

Thanks,
Best Regards,
Sandra Pazos / 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

SurveyBob
Newbie
Newbie
Posts: 22
Joined: Mon Dec 14, 2009 12:00 am

Re: Problems loading/compiling a cs-file that contains teeChart

Post by SurveyBob » Fri Jan 29, 2010 9:26 am

Hello Sandra,
Here the steps I do to reproduce the problem.

-Open the TeeChartTestSolution form the earlier post
-Open the Form1.cs in Desinger View
-right click on the view
-select "Edit..."
-doubleclick contour1
-select General and unhook the "Show in Legend" tick box
-close the editor
-save the form

It takes app. 7 minutes to save the form. Visual Studio is running with high CPU load. "System out of memory" exceptions are thrown by Visual Studion after a while.

I have Visual Studio 2008 with SP1 installed, running on a 32 bit Windows XP (SP 3) machine.

Best reagards,

SurveyBob

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Problems loading/compiling a cs-file that contains teeChart

Post by Sandra » Mon Feb 01, 2010 11:28 am

Hello SurveyBob,

I found that problem occurs because the number of points of NumXValues and NumZValues are too high. I recommend change values of NumXValues a NumZValues for example:

Code: Select all

			this.contour1.NumLevels = 20;
			this.contour1.NumXValues = 100;
			this.contour1.NumZValues = 100;

Previous code works correctly. Please check it works if you want.

I hope will helps.

Thanks,
Best Regards,
Sandra Pazos / 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