Page 1 of 1

Delete Series Event

Posted: Mon Aug 02, 2004 9:49 pm
by 8122863
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!

Posted: Mon Aug 02, 2004 11:17 pm
by Pep
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 ?

Refreshing Label

Posted: Thu Aug 05, 2004 1:31 am
by 8122863
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!

Posted: Thu Aug 05, 2004 9:03 am
by Pep
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 ?