DrawLine with Custom Vert Axes

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Aaron Peronto
Newbie
Newbie
Posts: 29
Joined: Wed Jun 20, 2007 12:00 am

DrawLine with Custom Vert Axes

Post by Aaron Peronto » Fri Sep 18, 2009 6:15 pm

I have an application that uses TeeChart .NET v 3.5.3371.26406
I have the LEFT and RIGHT axes visibility turned off.
I have 6 customer vertical axes.

When I try to add a DrawLine tool to this graph, I can draw lines but only horizontal lines.
I cannot control the vertical location of the lines unless I am zoomed in.
If I zoom in, I can draw lines fine and can control the location of the endpoints in both the vertical and horizontal directions.

But when I zoom back out again, the lines lose their vertical component again and become flat horizontal lines.

How can I fix this problem?
What needs to be done to the vertical axis for the DrawLine tool to be able to work properly with the custom vertical axes?

Thanks.
Aaron

Aaron Peronto
Newbie
Newbie
Posts: 29
Joined: Wed Jun 20, 2007 12:00 am

Re: DrawLine with Custom Vert Axes

Post by Aaron Peronto » Fri Sep 18, 2009 7:44 pm

Ok, I have made a little progress.
If I have a data series on the graph that is plotted onto any of my cumstom vertical axes, I can assign that series to the .SERIES property of the DrawLine tool. That will allow the vertical component of the lines drawn to appear to work properly.

Is there an editor for the lines created with the DrawLine tool?
I am looking for a way to change the color of the line, the thickness of the line, the endcap (into an arrow) on the line and the thickness of that endcap to make a bigger, more visible arrow.

I can do these things programmatically (with the exception of making the arrow endcap bigger) but wanted to present the users with an editor if one existed.
I thought there might be an editor that I could pass the DrawLineTool.Selected item into so that the user could edit the properties on that specific line.

Thanks again.
Aaron

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

Re: DrawLine with Custom Vert Axes

Post by Narcís » Mon Sep 21, 2009 8:12 am

Hi Aaron,
Ok, I have made a little progress.
If I have a data series on the graph that is plotted onto any of my cumstom vertical axes, I can assign that series to the .SERIES property of the DrawLine tool. That will allow the vertical component of the lines drawn to appear to work properly.
In that case this is most likely because your axes didn't have any range set. Probably setting axes minimum and maximum (for example using SetMinMax method) would also make this work.
Is there an editor for the lines created with the DrawLine tool?
I am looking for a way to change the color of the line, the thickness of the line, the endcap (into an arrow) on the line and the thickness of that endcap to make a bigger, more visible arrow.

I can do these things programmatically (with the exception of making the arrow endcap bigger) but wanted to present the users with an editor if one existed.
I thought there might be an editor that I could pass the DrawLineTool.Selected item into so that the user could edit the properties on that specific line.
No, such editor doesn't exist. I'll add your request to the wish-list to be considered for inclusion in future releases.
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

Aaron Peronto
Newbie
Newbie
Posts: 29
Joined: Wed Jun 20, 2007 12:00 am

Re: DrawLine with Custom Vert Axes

Post by Aaron Peronto » Mon Sep 21, 2009 1:40 pm

Narcís wrote: In that case this is most likely because your axes didn't have any range set. Probably setting axes minimum and maximum (for example using SetMinMax method) would also make this work.
My axes are using the .Automatic setting of TRUE to allow TeeChart to determine what should be displayed based on the data available in the series.
My users do have the option to scale the axes manually to set specific min and max values on the axes but typically use the automatic setting to have TeeChart decide the range since it will always display the ranges needed to show all of the data added to the graph.
When the graph itself determines those ranges to be displayed, it does not set the min and max based on what it picked for the range?

I will have to take a look at my code to see how setting the Min and Max will impact the scaling and zooming that I have to handle.

Thanks for the information.

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

Re: DrawLine with Custom Vert Axes

Post by Narcís » Mon Sep 21, 2009 1:51 pm

Hi Aaron,

When axes are set to automatic Minimum and Maximum are being calculated after series are populated and according to series' values.
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

Aaron Peronto
Newbie
Newbie
Posts: 29
Joined: Wed Jun 20, 2007 12:00 am

Re: DrawLine with Custom Vert Axes

Post by Aaron Peronto » Mon Sep 21, 2009 1:56 pm

So if my custom vert axes are set to Automatic = true and I add series to the graph with one of those custom vertical axes as its vert axis, then the Min and Max for that custom axis should be set automatically by TeeChart?
I will have to double check to see what is happening then.
Because I only use my custom axes and they are all set to .Automatic = true by default and when I try to draw a line on my graph, there is no vertical component. So I'm not sure what is going on but it appears that the graph thinks the Min and Max are not set for my vert axis.
If the Min and Max are set for my custom vertical axis, I should not have to assoaciate a data series with the line I'm drawing correct?

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

Re: DrawLine with Custom Vert Axes

Post by Narcís » Mon Sep 21, 2009 1:58 pm

Hi Aaron,
So if my custom vert axes are set to Automatic = true and I add series to the graph with one of those custom vertical axes as its vert axis, then the Min and Max for that custom axis should be set automatically by TeeChart?
Yes. But with that I meant that your DrawLines will behave as you reported until you populate your series so that axes scales are set or you manually set their scales.
If the Min and Max are set for my custom vertical axis, I should not have to assoaciate a data series with the line I'm drawing correct?
Yes, probably it wouldn't be necessary.
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

Aaron Peronto
Newbie
Newbie
Posts: 29
Joined: Wed Jun 20, 2007 12:00 am

Re: DrawLine with Custom Vert Axes

Post by Aaron Peronto » Mon Sep 21, 2009 3:19 pm

Narcís wrote:Yes. But with that I meant that your DrawLines will behave as you reported until you populate your series so that axes scales are set or you manually set their scales.
But my series is already populated and drawn on the graph using one of my custom vertical axis BEFORE I am trying to draw a line on the graph.
And yet, I still see the problem with the vertical portion of the line not drawing properly.

Yeray
Site Admin
Site Admin
Posts: 9613
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: DrawLine with Custom Vert Axes

Post by Yeray » Tue Sep 22, 2009 9:15 am

Hi Aaron,

The problem probably is that your color line tool needs to have associated a series that uses a custom axis because, by default, it uses the Left and Bottom axis so, if you don't have one of them, the tool can't use it.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Aaron Peronto
Newbie
Newbie
Posts: 29
Joined: Wed Jun 20, 2007 12:00 am

Re: DrawLine with Custom Vert Axes

Post by Aaron Peronto » Tue Sep 22, 2009 1:00 pm

Yeray wrote:Hi Aaron,

The problem probably is that your color line tool needs to have associated a series that uses a custom axis because, by default, it uses the Left and Bottom axis so, if you don't have one of them, the tool can't use it.
This does appear to be the case.
Any chance we could add that to the wish list to allow the programmer to set the vertical axis assigned to the draw line tool ?
If I have series assigned to the Left axis, I don't have to associated my line tool with any particular series.
It would be nice to not have to do that assignment in any case.

Thanks for the help.

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

Re: DrawLine with Custom Vert Axes

Post by Narcís » Tue Sep 22, 2009 2:54 pm

Hi Aaron,

Sure! Just added it to the list.
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

Post Reply