Dear TeeChart Team,
May I know in details the meaning of the CursorTool.Series property. From the tutorial and help files, I can roughly guess that this property is related to the Snap something property. But I am interested in knowing whether this property is able to solve my requirement below:
I have a multiple vertical axes chart, for which only 1 of the vertical axis is visible at a time. When I add a CursorTool into the chart, it seems to me like the cursortool is always "associated" with the axis Axes.Left. I conclude so because whenever I show 1 custom axis and hide away all other axes including Axes.Left, the cursor tool's horizontal segment stops moving up and down (it just sits at the middle of the chart and is stuck there) while the vertical segment of the cursor tool can still move horizontally freely.
I need the cursortool to be associated with any of my custom vertical axis, and not just the default one Axes.Left.
So...
(1) Is my requirement possible to implement?
(2) Is CursorTool.Series property a rescue here? I tried it but it does not seem to have any effect that I can notice at all.
(3) If you know of any workaround please give me a suggestion to carry on.
Thank you.
Huy
Associate CursorTool with a custom axis (not Axes.Left)
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Huy,
Please find below the answers to your questions:
1. Yes, CursorTool is not associated to any axis, it is associated to a series and therefore its horizontal and vertical axes.
2. Yes, every time you switch visible axes/series you should set CursorTool.Series to the visible series.
3. That's what I suggested in question 2.
Hope this helps!
Please find below the answers to your questions:
1. Yes, CursorTool is not associated to any axis, it is associated to a series and therefore its horizontal and vertical axes.
2. Yes, every time you switch visible axes/series you should set CursorTool.Series to the visible series.
3. That's what I suggested in question 2.
Hope this helps!
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
I see. But so far I didn't use the property CursorTool.Series at all but it still works fine until my Axis.Left is set to invisible.
Does that mean by default the property is already set to some series which is associated with Axis.Left? What happens if I don't set this property like I am just forgetting about it in my current program?
Thank you.
Does that mean by default the property is already set to some series which is associated with Axis.Left? What happens if I don't set this property like I am just forgetting about it in my current program?
Thank you.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi huy,
No, by default CursorTool is not set to any series and it is not a problem assigning it to a series. If you make default axes invisible the CursorTool should still be visible and active.
No, by default CursorTool is not set to any series and it is not a problem assigning it to a series. If you make default axes invisible the CursorTool should still be visible and active.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Newbie
- Posts: 57
- Joined: Wed Jan 30, 2008 12:00 am
Hi,
When I use this :
The CursorTool's horizontal will not move.
But when series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left ,
the horizontal move freely.
What's the correct approach for setting the CursorTool?
Thank you!
When I use this :
Code: Select all
Dim series As New Steema.TeeChart.Styles.Line(TChart1.Chart)
series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right
series.Add(1, 5)
series.Add(2, 10)
Dim cursorTool As New Steema.TeeChart.Tools.CursorTool(TChart1.Chart)
cursorTool.Active = True
cursorTool.FastCursor = True
cursorTool.FollowMouse = True
cursorTool.Pen.Color = Color.Red
But when series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left ,
the horizontal move freely.
What's the correct approach for setting the CursorTool?
Thank you!
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Chris,
You need to assign a series to the CursorTool, for example, this works:
You need to assign a series to the CursorTool, for example, this works:
Code: Select all
Dim series As New Steema.TeeChart.Styles.Line(TChart1.Chart)
series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right
series.Add(1, 5)
series.Add(2, 10)
Dim cursorTool As New Steema.TeeChart.Tools.CursorTool(TChart1.Chart)
cursorTool.Active = True
cursorTool.Series = series
cursorTool.FastCursor = True
cursorTool.FollowMouse = True
cursorTool.Pen.Color = Color.Red
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |