ColorLine.AllowDrag = False causes ColorLine to disappear

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
IHWB
Newbie
Newbie
Posts: 8
Joined: Wed Oct 04, 2006 12:00 am

ColorLine.AllowDrag = False causes ColorLine to disappear

Post by IHWB » Tue Apr 08, 2008 11:53 am

I'm using the latest release (6th Mar. 2008) of TeeChart .NET v2 in a VB project.

I have a problem of not being able to create non-draggable ColorLines.

When I add a ColorLine to a Chart and set

Code: Select all

ColorLine1.AllowDrag = False
the ColorLine is not visible in the chart.

If I then use the TeeChart Editor during runtime and go to Tools -> ColorLine and switch "Allow Drag" on, the ColorLine reappears and remains displayed even if I switch "Allow Drag" off again.

Am I doing something wrong or is this a bug?

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Tue Apr 08, 2008 2:38 pm

Hi IHWB,

Code below works fine for me here using TeeChart for .NET v2 update build we posted today. Could you please try if today's version works fine at your end? If it doesn't, could you please modify the code below or send us a simple example project we can run "as-is" to reproduce the problem here?

You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.

Thanks in advance.

Code: Select all

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim Line1 As New Steema.TeeChart.Styles.Line(TChart1.Chart)
        Line1.FillSampleValues()

        Dim ColorLine1 As New Steema.TeeChart.Tools.ColorLine(TChart1.Chart)
        ColorLine1.Axis = TChart1.Axes.Left
        ColorLine1.Value = Line1.MinYValue() + (Line1.MaxYValue() - Line1.MinYValue()) / 2
        ColorLine1.AllowDrag = False
    End Sub
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

IHWB
Newbie
Newbie
Posts: 8
Joined: Wed Oct 04, 2006 12:00 am

Post by IHWB » Tue Apr 08, 2008 4:04 pm

It seems that I have found the problem:
The disappearing ColorLine occurred because the value of the ColorLine was beyond the axis limits, which is expected behavior, I guess.

The fact that the ColorLine was displayed when I switched on AllowDrag confused me a little.

Thanks for the quick reply, though!

Post Reply