Page 1 of 1

Serious failure in V3.2.2930.22967, related to the gradient

Posted: Sun Jan 20, 2008 1:45 am
by 13047134
I have a bar chart where each bar is showing a gradient.

Firstly, when entering the editor for the first time at

Series --> Format --> Format --> Gradient.
The Relative check box is disabled, yet the gradient is set.

After clicking the Gradient button and closing the gradientEditor dialog, the Relative checkbox is enabled. The Relative checkbox should always be enabled if gradient is set.

Secondly and more critical.

If the relative check box is checked I get the following catestrophic failure when resizing the window holding the tchart. This results in the tchart component failing and the window showing the Red cross where is should have been.

Code: Select all

System.ArgumentException: Rectangle '{X=183,Y=41,Width=0,Height=308}' cannot have a width or height equal to zero.
   at System.Drawing.Drawing2D.LinearGradientBrush..ctor(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
   at Steema.TeeChart.Drawing.Gradient.DrawingBrush(Rectangle rect)
   at Steema.TeeChart.Drawing.Graphics3DGdiPlus.Rectangle(Rectangle r)
   at Steema.TeeChart.Drawing.Graphics3D.Rectangle(Int32 left, Int32 top, Int32 right, Int32 bottom)
   at Steema.TeeChart.Styles.CustomBar.BarRectangle(Color barColor, Int32 aLeft, Int32 aTop, Int32 aRight, Int32 aBottom)
   at Steema.TeeChart.Styles.CustomBar.BarRectangle(Color barColor, Rectangle r)
   at Steema.TeeChart.Styles.Bar.DrawBar(Int32 barIndex, Int32 startPos, Int32 endPos)
   at Steema.TeeChart.Styles.Bar.DrawValue(Int32 valueIndex)
   at Steema.TeeChart.Styles.Series.Draw()
   at Steema.TeeChart.Styles.Series.DrawSeries()
   at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
   at Steema.TeeChart.Chart.InternalDraw(Graphics g)
   at Steema.TeeChart.TChart.Draw(Graphics g)
   at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
   at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
   at System.Windows.Forms.Control.WmPaint(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
While the first issue is not significant and can wait for a fix, I think the second needs urgent attention. The effect of this is that my users could spend considerable time working on a chart only to loose it all if they happen to resize the window... Please can this be resolved as a matter of urgency.

Thanks....

Posted: Mon Jan 21, 2008 2:42 pm
by narcis
Hi Adrian,
Firstly, when entering the editor for the first time at

Series --> Format --> Format --> Gradient.
The Relative check box is disabled, yet the gradient is set.

After clicking the Gradient button and closing the gradientEditor dialog, the Relative checkbox is enabled. The Relative checkbox should always be enabled if gradient is set.
I've been able to reproduce the issue here and added it (TF02012754) to our defect list to be fixed for future releases.
Secondly and more critical.

If the relative check box is checked I get the following catestrophic failure when resizing the window holding the tchart. This results in the tchart component failing and the window showing the Red cross where is should have been.
I'm not able to reproduce this here using our current TeeChart for .NET v3 sources. Can you reproduce this with the All Features\Welcome !\Chart styles\Standard\Bar\Bar gradient example in the features demo?

Thanks in advance.

Posted: Thu Jan 24, 2008 10:29 pm
by 13047134
Tested with V 3.2.2945.19736, not fixed

in the Examples app goto

Welcome !\Chart styles\Standard\Bar\Bar gradient
double click the yellow area
double click barseries1
Note that the Relative check box is not enabled (first problem)
Click the Gradient button
Click Ok
Note the Relative checkbox is now enabled
Check the Relative check box
Click Close
Click and hold the Examples application resize handle, bottom right had corner

resize the window... you need to sort of scorll around sow in the same action move in and out a few times...

the following results


System.ArgumentException: Rectangle '{X=80,Y=71,Width=0,Height=186}' cannot have a width or height equal to zero.
at System.Drawing.Drawing2D.LinearGradientBrush..ctor(Rectangle rect, Color color1, Color color2, LinearGradientMode linearGradientMode)
at Steema.TeeChart.Drawing.Gradient.DrawingBrush(Rectangle rect)
at Steema.TeeChart.Drawing.Graphics3DGdiPlus.Polygon(Point[] p)
at Steema.TeeChart.Drawing.Graphics3D.PolygonFour()
at Steema.TeeChart.Drawing.Graphics3D.Cube(Int32 left, Int32 top, Int32 right, Int32 bottom, Int32 z0, Int32 z1, Boolean darkSides)
at Steema.TeeChart.Styles.Bar.DrawBar(Int32 barIndex, Int32 startPos, Int32 endPos)
at Steema.TeeChart.Styles.Bar.DrawValue(Int32 valueIndex)
at Steema.TeeChart.Styles.Series.Draw()
at Steema.TeeChart.Styles.Series.DrawSeries()
at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools)
at Steema.TeeChart.Chart.InternalDraw(Graphics g)
at Steema.TeeChart.TChart.Draw(Graphics g)
at Steema.TeeChart.TChart.OnPaint(PaintEventArgs pe)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2407
CodeBase: file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
TeeChartNetExamples
Assembly Version: 3.2.2945.19736
Win32 Version: 3.2.2945.19736
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v3/Examples/DemoProject/bin/ExecutableDemo/TeeChartNetExamples.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2407
CodeBase: file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
AxInterop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v3/Examples/DemoProject/bin/ExecutableDemo/AxInterop.SHDocVw.DLL
----------------------------------------
Interop.SHDocVw
Assembly Version: 1.1.0.0
Win32 Version: 1.1.0.0
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v3/Examples/DemoProject/bin/ExecutableDemo/Interop.SHDocVw.DLL
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/windows/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
TeeChart
Assembly Version: 3.2.2945.19736
Win32 Version: 3.2.2945.19736
CodeBase: file:///C:/Program%20Files/Steema%20Software/TeeChart%20for%20.NET%20v3/Examples/DemoProject/bin/ExecutableDemo/TeeChart.DLL
----------------------------------------
System.Design
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.design/1.0.5000.0__b03f5f7f11d50a3a/system.design.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.2032
CodeBase: file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------

Posted: Fri Jan 25, 2008 12:21 pm
by narcis
Hi Adrian,

Thanks for the information. I finally could reproduce the issue (TF02012771) here and added it to the bug list as a high-priority item. The clue was scrolling the chart after having resized it.