Page 1 of 1

DrawLine with Custom Vert Axes

Posted: Fri Sep 18, 2009 6:15 pm
by 14045609
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

Re: DrawLine with Custom Vert Axes

Posted: Fri Sep 18, 2009 7:44 pm
by 14045609
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

Re: DrawLine with Custom Vert Axes

Posted: Mon Sep 21, 2009 8:12 am
by narcis
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.

Re: DrawLine with Custom Vert Axes

Posted: Mon Sep 21, 2009 1:40 pm
by 14045609
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.

Re: DrawLine with Custom Vert Axes

Posted: Mon Sep 21, 2009 1:51 pm
by narcis
Hi Aaron,

When axes are set to automatic Minimum and Maximum are being calculated after series are populated and according to series' values.

Re: DrawLine with Custom Vert Axes

Posted: Mon Sep 21, 2009 1:56 pm
by 14045609
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?

Re: DrawLine with Custom Vert Axes

Posted: Mon Sep 21, 2009 1:58 pm
by narcis
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.

Re: DrawLine with Custom Vert Axes

Posted: Mon Sep 21, 2009 3:19 pm
by 14045609
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.

Re: DrawLine with Custom Vert Axes

Posted: Tue Sep 22, 2009 9:15 am
by yeray
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.

Re: DrawLine with Custom Vert Axes

Posted: Tue Sep 22, 2009 1:00 pm
by 14045609
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.

Re: DrawLine with Custom Vert Axes

Posted: Tue Sep 22, 2009 2:54 pm
by narcis
Hi Aaron,

Sure! Just added it to the list.