How to fit all the lines into a chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: How to fit all the lines into a chart

Post by Christopher » Tue Jun 10, 2014 2:37 pm

Raavi wrote:Slowly taking that code into my veins but I see it does not take Chart bounds into account.
In what way do you see Chart bounds as relevant here?
Raavi wrote:I am not an expert in 2D-graphics but I assume that this feature is not available for consumption yet.
Which feature isn't available for consumption?
Best Regards,
Christopher Ireland / 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

Raavi
Newbie
Newbie
Posts: 36
Joined: Tue Apr 01, 2014 12:00 am

Re: How to fit all the lines into a chart

Post by Raavi » Tue Jun 10, 2014 2:59 pm

On calculating appropriate ratios in maintaining the aspect-ratio, I believe it should also take the Chart bounds into consideration so it may be possible to put all the drawings inside the chart.

* Just a vague idea. I do not know whether the above is valid at all.


If valid, I treat this as a feature that is not yet available for consumption.

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: How to fit all the lines into a chart

Post by Christopher » Tue Jun 10, 2014 3:05 pm

Raavi wrote:On calculating appropriate ratios in maintaining the aspect-ratio, I believe it should also take the Chart bounds into consideration so it may be possible to put all the drawings inside the chart.

* Just a vague idea. I do not know whether the above is valid at all.


If valid, I treat this as a feature that is not yet available for consumption.
I argue that this vague idea of yours is not valid, which is to say, that it is not possible to have an horizontal axis expand to the pixel-per-value ratio of a vertical axis at the same time as having the series values dependent on the axes within the axes minimum and maximum values. Only one of two things can happen to ameliorate this situation 1) the chart rectangle (the rectangle defined by the axes) gets bigger, or 2) the symmetry of pixel-per-value ratio is broken.
Best Regards,
Christopher Ireland / 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

Raavi
Newbie
Newbie
Posts: 36
Joined: Tue Apr 01, 2014 12:00 am

Re: How to fit all the lines into a chart

Post by Raavi » Tue Jun 10, 2014 3:39 pm

1) and 2). That is totally right. I have no doubt in that.

May I ask, how to perform an automatic zoom that fits all polygon in a given Chart rectangle?

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: How to fit all the lines into a chart

Post by Christopher » Tue Jun 10, 2014 3:52 pm

Raavi wrote:1) and 2). That is totally right. I have no doubt in that.

May I ask, how to perform an automatic zoom that fits all polygon in a given Chart rectangle?
Without the use of IsoVertAxes or IsoHorizAxes there is no problem whatsoever.

With the use of IsoVertAxes or IsoHorizAxes things become more problematic, shall we say impossible under circumstances already identified.

One idea would be to check the pixel-per-value ratio of the horizontal and vertical axes manually, and then set the chart to IsoVertAxes or IsoHorizAxes depending on which one is bigger. That way you can guarantee that the series points won't be beyond the axes maximum and minimum values.
Best Regards,
Christopher Ireland / 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

Raavi
Newbie
Newbie
Posts: 36
Joined: Tue Apr 01, 2014 12:00 am

Re: How to fit all the lines into a chart

Post by Raavi » Tue Jun 10, 2014 4:21 pm

Thanks. I will dig deeper using ILSpy to understand the dependencies. In the mean-time if you have any updates on this issue please let me know.

Regards,

Post Reply