Profile Picture

NVennSeries: Issue rendering Venn Contour within OnPaint() method of UserControl class

Posted By Edem Attiogbe 14 Years Ago

NVennSeries: Issue rendering Venn Contour within OnPaint() method of...

Author
Message
Edem Attiogbe
Posted 14 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: Forum Members
Last Active: 14 Years Ago
Posts: 3, Visits: 1
I'm trying to render a Venn diagram within a System.Windows.Forms.UserControl class. I added an NVennSeries to an NVennChart, and the NVennChart to the NChartControl.

I do all the setup within either my UserControl's constructor OnLoad() eventhandler. Everything renders fine when my NVennSeries 'AddVennContour()' call is right after my setup code, but when I move the 'AddVennContour()' method call of the NVennSeries to my UserControl's OnPaint() method, nothing happens. I know OnPaint() is being called anytime the window changes.

Any ideas? Thanks

My Code:

this.vennChartTitle = nevronChartControl.Labels.AddHeader("Spotfire Novartis Venn Diagram");
this.vennChartTitle.TextStyle.FontStyle = new NFontStyle("Times New Roman", 18, FontStyle.Italic);
this.vennChartTitle.TextStyle.ShadowStyle.Color = Color.BlueViolet;

this.nevronChartControl.Legends.Clear();
this.nevronChartControl.Charts.Clear();//Make sure we are starting fresh, with no Nevron Charts of any sort
this.nevronChartControl.Charts.Add(VennPlot);//Add the Nevron venn diagram component to the collection of Nevron Charts
this.VennPlot.Projection.SetPredefinedProjection(PredefinedProjection.Orthogonal);//Set the projection to Orthagonal
this.VennPlot.Series.Clear();

this.VennPlot.Series.Add(TheVennSeries);
this.TheVennSeries.Name = VennSeries;
this.TheVennSeries.Visible = true;




protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
NVennSeries vseries = this.VennPlot.Series[0] as NVennSeries;
vseries.ClearContours();//Remove any pre-existing venn rendering
vseries.AddVennContour(VennShape.Ellipse, new NPointF(15, 0), new NSizeF(50, 50), 0, 1);
}




Similar Topics


Reading This Topic