Delete Series Event

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
jbalasub
Newbie
Newbie
Posts: 10
Joined: Thu Nov 20, 2003 5:00 am

Delete Series Event

Post by jbalasub » Mon Aug 02, 2004 9:49 pm

I need to do some state manipulation in my code after a user deletes a series from the chart using the editor. Is there a delete event that I can use?

Thanks!

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Aug 02, 2004 11:17 pm

Hi,

there's not a delete event but, how about using the OnAfterDraw event to check whether a Series has been removed or which Series has been removed ?

jbalasub
Newbie
Newbie
Posts: 10
Joined: Thu Nov 20, 2003 5:00 am

Refreshing Label

Post by jbalasub » Thu Aug 05, 2004 1:31 am

I tried the AfterDraw and the beforeDrawSeries event, but it didn't exactly do what I wanted it to do. So for every series that is added to the tChart I change the Label to add a paraticular parameter to the legend. For example, say I add one series to the chart then the y label on the left would say "parameter1". And if I add another series then the label would say "Parameter1 Parameter2." However, if the user deletes the series or uses the legend to disable a particular series then the legend should automatically be updated to remove one or more of the labels on the list. I used the AfterDraw event, and then when to the BeforeDrawSeries event to do the updates. Adding the names to the legend works perfectly. However, when someone does a delete or disactivates a series the update is done in a noticeable delayed manner. The user will disable a series and the update won't happen untill the next onPaint call. To fix this I added tChart.Refresh() line into the code. This made the behavior worst. Is there another event call that I could use that would do I more immediate update, maybe like an onDraw event.

Thanks!

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Thu Aug 05, 2004 9:03 am

Hi,
The user will disable a series and the update won't happen untill the next onPaint call. To fix this I added tChart.Refresh() line into the code. This made the behavior worst. Is there another event call that I could use that would do I more immediate update, maybe like an onDraw event.
Where are you controling this ? Have you tried placing the code in the OnBeforeDrawSeries event ?

Post Reply