How to handle marks outside and change of series type
Posted: Thu Oct 27, 2005 1:53 pm
I have the problem with marks for a series being displayed outside of the axis on bar series. I found this workaround:
which works fine...
...except for when the user opens the chart editor and changes the type of series - since he actually replaces the existing series with a new one, that new one doesn't have the event wired up.
Do you have any idea how to accomplish this? One way would be to perhaps catch the CloseEditor event on the editor and loop through all the series in the chart and check if they have that event handler assigned - but you can't check for that, you can only assign or remove eventhandlers. So how do I accomplish this. I don't just want to add more new event handlers to each series, that could potentially lead to the handler being called ridicuosly many times - or am I misunderstanding that?
Any suggestions?
//Tommie
Code: Select all
private void line1_GetSeriesMark(Steema.TeeChart.Styles.Series series, Steema.TeeChart.Styles.GetSeriesMarkEventArgs e)
{
if ((series.XValues[e.ValueIndex]<tChart1.Axes.Bottom.Minimum) ||
(series.XValues[e.ValueIndex]>tChart1.Axes.Bottom.Maximum))
e.MarkText="";
}
...except for when the user opens the chart editor and changes the type of series - since he actually replaces the existing series with a new one, that new one doesn't have the event wired up.
Do you have any idea how to accomplish this? One way would be to perhaps catch the CloseEditor event on the editor and loop through all the series in the chart and check if they have that event handler assigned - but you can't check for that, you can only assign or remove eventhandlers. So how do I accomplish this. I don't just want to add more new event handlers to each series, that could potentially lead to the handler being called ridicuosly many times - or am I misunderstanding that?
Any suggestions?
//Tommie