Hello,
Is there any event in the chart, to detect when a serie has been added or removed from the chart with the chart editor?
Thanks in advance,
Event serie added or removed?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: Event serie added or removed?
Hi wakeup,
There are no specific events for that but you can do it using existing editor events, for example:
Hope this helps!
There are no specific events for that but you can do it using existing editor events, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private Steema.TeeChart.Editor editor1;
private int numSeries;
private void InitializeChart()
{
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.FillSampleValues();
editor1 = new Steema.TeeChart.Editor(tChart1);
editor1.ShowEditor += new EventHandler(editor1_ShowEditor);
editor1.CloseEditor += new EventHandler(editor1_CloseEditor);
tChart1.DoubleClick += new EventHandler(tChart1_DoubleClick);
}
void tChart1_DoubleClick(object sender, EventArgs e)
{
editor1.ShowModal();
}
void editor1_ShowEditor(object sender, EventArgs e)
{
numSeries = tChart1.Series.Count;
}
void editor1_CloseEditor(object sender, EventArgs e)
{
if (numSeries > tChart1.Series.Count)
{
this.Text = "series removed";
}
else
{
if (numSeries < tChart1.Series.Count)
{
this.Text = "series added";
}
else
{
this.Text = "same series number";
}
}
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Event serie added or removed?
I think it will be enought.
Thanks!
Thanks!