You must be logged in to reply to this topic.
Tagged: C#, Charts, Visual Studio 2010
i’m new to Chart Control so i need some help
i have declared and created a new series in a event lets say FormLoad event. i want to use the same series to be used in an other event how can i do it
eg:
public void Form1_Load(object sender, EventArgs e)
{
Series Series1 = new Series();
Series1.Name = "Series#";
Series1.ChartArea = "ChartArea1″;
.
.
.
Series1.Points.AddXY(varX, varY);
.
.
.
Chart1.Series.Add(Series1);
}
i want this Series1 to be available even in other events(like some public variable) how do i do it please help
Hello,
I am not sure if you are using C1Chart control of Winforms but if you want to access the series from any other event then you may access it by indexing through Series collection. The code may look like:
Series Series1 = Chart1.Series[0];
Regards
Ashish
You must be logged in to reply to this topic.
As a leading component vendor in the Microsoft Visual Studio Industry Partner program, ComponentOne has been providing the widest range of Microsoft Visual Studio components, IDE platform development tools, and applications for over 22 years. ComponentOne product lines encompass custom WinForms, ASP.NET, WPF, Silverlight, Mobile, and COM components, documentation tools, and Web Parts for Microsoft Office SharePoint Server and Windows SharePoint Services.
Contact ComponentOne: 1.800.858.2739 | Pittsburgh: 412.681.4343
©2013 ComponentOne LLC All Rights Reserved.
All product and company names herein may be trademarks of their respective owners.
ComponentOne holds a license under Patent No. 5,490,216 (which expires on September 21, 2013)
