Note that there are some explanatory texts on larger screens.

plurals
  1. POSetting EdgeStyle throws NullReferenceException for TeeChart Pocket
    primarykey
    data
    text
    <p>I'm using TeeChart Pocket running on .NET 3.5. The target application is running Windows CE 6.0 with .NET 3.5. I made a small forms application that draws a pie chart, but when I add an edge style I'm getting a <code>NullReferenceException</code>.</p> <p>The minimal code (sans designer code) that produces this exception looks like this:</p> <pre><code>public class Form1 : Form { public Form1() { InitializeComponent(); var series = new Pie(); series.FillSampleValues(6); series.BevelPercent = 20; series.EdgeStyle = EdgeStyles.Curved; var chart = new TChart(); chart.Series.Add(series); this.Controls.Add(chart); } } </code></pre> <p>This exception is also thrown for the following program:</p> <pre><code>chart.Series.Add(series); series.FillSampleValues(6); series.BevelPercent = 20; series.EdgeStyle = EdgeStyles.Curved; chart.Location = new Point(0, 0); chart.Width = this.Width; chart.Height = this.Height; this.Controls.Add(chart); </code></pre> <p>Why am I getting a <code>NullReferenceException</code>? If I uncomment the line setting the <code>EdgeStyle</code>, no exceptions are thrown. Here's the full stack trace:</p> <pre><code>System.NullReferenceException was unhandled Message="NullReferenceException" StackTrace: at System.Drawing.Graphics.FillPolygon(Brush brush, Point[] points) at Steema.TeeChart.Drawing.Graphics3DGdiPlus.Polygon(PointDouble[] p) at Steema.TeeChart.Drawing.Graphics3D.Pie3D.DrawPoints() at Steema.TeeChart.Drawing.Graphics3D.Pie3D.DoTopGradient(Int32 zDepth) at Steema.TeeChart.Drawing.Graphics3D.Pie3D.DoCurvedGradient(Int32 zDepth) at Steema.TeeChart.Drawing.Graphics3D.Pie3D.DrawLighting(EdgeStyles edgeStyle) at Steema.TeeChart.Drawing.Graphics3D.Pie3D.Pie(Int32 xCenter, Int32 yCenter, Int32 xRadius, Int32 yRadius, Int32 z0, Int32 z1, Double startAngle, Double endAngle, Boolean darkSides, Boolean drawSides, Int32 donutPercent, Int32 bevelPercent, EdgeStyles edgeStyle) at Steema.TeeChart.Drawing.Graphics3D.Pie(Int32 xCenter, Int32 yCenter, Int32 xRadius, Int32 yRadius, Int32 z0, Int32 z1, Double startAngle, Double endAngle, Boolean darkSides, Boolean drawSides, Int32 donutPercent, Int32 bevelPercent, EdgeStyles edgeStyle) at Steema.TeeChart.Drawing.Graphics3D.Pie(Int32 xCenter, Int32 yCenter, Int32 xOffset, Int32 yOffset, Int32 xRadius, Int32 yRadius, Int32 z0, Int32 z1, Double startAngle, Double endAngle, Boolean darkSides, Boolean drawSides, Int32 donutPercent, Int32 bevelPercent, EdgeStyles edgeStyle) at Steema.TeeChart.Styles.Pie.DrawPie(Graphics3D g, Int32 valueIndex) at Steema.TeeChart.Styles.Pie.DrawPie(Int32 valueIndex) at Steema.TeeChart.Styles.Pie.DrawValue(Int32 valueIndex) at Steema.TeeChart.Styles.Pie.Draw() at Steema.TeeChart.Styles.Series.DrawSeries() at Steema.TeeChart.Chart.DrawAllSeries(Graphics3D g) at Steema.TeeChart.Chart.InternalDraw(Graphics g, Boolean noTools) at Steema.TeeChart.Chart.InternalDraw(Graphics g) at Steema.TeeChart.Pocket.TChart.Draw(Graphics g) at Steema.TeeChart.Pocket.TChart.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam) at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) at Microsoft.AGL.Forms.WL.Update(IntPtr hwnThis) at System.Windows.Forms.Control.Update() at System.Windows.Forms.Control.Refresh() at Steema.TeeChart.Pocket.TChart.OnResize(EventArgs e) at System.Windows.Forms.Control.WnProc(WM wm, Int32 wParam, Int32 lParam) at System.Windows.Forms.Control._InternalWnProc(WM wm, Int32 wParam, Int32 lParam) at Microsoft.AGL.Forms.EVL.EnterMainLoop(IntPtr hwnMain) at System.Windows.Forms.Application.Run(Form fm) at Demo.Form1.Main() InnerException: </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload