Page 1 of 1

Unexpected behaviour using selector tool

Posted: Fri Jul 30, 2010 5:44 am
by 15655996
Hi,

I use a Selecor to select series, here is the constructor:

Code: Select all

    Public Sub CreateSeriesSelector()
        SeriesSelector = New Selector
        SeriesSelector.Active = True
        SeriesSelector.AllowDrag = False
        SeriesSelector.SelectableParts = Nothing
        Dim SelectableParts As New Object()
        ReDim SelectableParts(Chart1.Series.Count)
        For i As Integer = 0 To Chart1.Series.Count - 1
            SelectableParts(i) = Chart1.Series(i)
            If TypeOf Chart1.Series(i) Is Line Then
                Dim l As Line = Chart1.Series(i)
                If l.Pointer.Visible Then
                    Dim s As Integer = l.Pointer.HorizSize + 2
                    If l.Pointer.VertSize > s - 2 Then
                        s = l.Pointer.VertSize + 2
                    End If
                    SeriesSelector.HandleSize = s
                End If
            End If
            If TypeOf Chart1.Series(i) Is Points Then
                Dim l As Points = Chart1.Series(i)
                Dim s As Integer = l.Pointer.HorizSize + 2
                If l.Pointer.VertSize > s - 2 Then
                    s = l.Pointer.VertSize + 2
                End If
                SeriesSelector.HandleSize = s
            End If
        Next
        SeriesSelector.SelectableParts = SelectableParts

        If ActiveSeries IsNot Nothing Then SeriesSelector.Series = ActiveSeries
    End Sub
If a series is selected and I now click into the chart area then the series becomes deselected and the chart area becomes selected. Please notice: The series selector is the only one tool in use.

Why?

Best regards

Uli

Re: Unexpected behaviour using selector tool

Posted: Fri Jul 30, 2010 10:13 am
by 10050769
Hello Uli,

I don't sure that I have understood well what is your problem. Could you please, explain exactly us what is your problem? Also, can you please, tell us what you want that your code do? So we can help you solve the problem.

Thanks,

Re: Unexpected behaviour using selector tool

Posted: Fri Jul 30, 2010 11:52 am
by 15655996
Hi Sandra,

sometimes we have to format or to apply some mathematical operations to individual series. The series (= ActiveSeries in the code above) should be selected by clicking, the selected series should be visualized by the selector tool. The selected series should maintain its status (as selected) until another one becomes selected or the selector will be disposed.

After selecting a series (the selector has been created dynamically by the code in the first message)the following correct image appears:
sel1.JPG
sel1.JPG (52.34 KiB) Viewed 8788 times
When now clicking somewhere in the chart area but not at a series the following image results:
sel2.JPG
sel2.JPG (54.38 KiB) Viewed 8784 times
This seems to be not correct since only series are defined as selectable parts of the selector. Intentionally, the appearance should be the same as in sel1.jpg.

A workaround is to destroy the selector upon MouseDown event and create it again but it requires a redraw accompanied by flickering.

Best regards

Uli

Re: Unexpected behaviour using selector tool

Posted: Mon Aug 02, 2010 12:25 pm
by 10050769
Hello Uli,

We haven't forgotten this. We are investigating it and we'll be back here asap.

Thanks,

Re: Unexpected behaviour using selector tool

Posted: Thu Aug 05, 2010 11:39 am
by 10050769
Hello Uli,

Sorry for delay, I have checked your problem and I have added your request to the wish-list with number [TF02015073] to be considered for inclusion in future releases.
Thanks,