[Lazarus] TAChart 2nd Y Axis

Alexander Klenin klenin at gmail.com
Fri Jul 29 05:50:52 CEST 2011


On Fri, Jul 29, 2011 at 01:04, David M. Lawrence <dave at fuzzo.com> wrote:
> I have tried to deconstruct the code in the demo, but cannot understand it
> works, and my efforts to copy the code end in unspecified access violations.

What do you mean by "unspecified"? Did they happen inside TAChart code?
If so, can you post a tracebacks?

> In any event, I cannot set up simple multipiers like you have in the sample
> -- I have a database with hundreds of climate data files, and with new
> climate normals being released, would like to add hundreds more.  Each data
> set would have to be transformed individually.

Are you talking about the linear transformation?
Well, you could write a loop finding min/man data value, and
recalculate scale accordingly.
However, auto-scaling transformation does this for you.

> It might be more helpful to be able to set max and min values in
> TUserDefinedChartSource -- you have that capability in TRandomChartSource
> (that much I did understand from the axis demo).

Those serve completely different purpose.
TRandomChartSource _generates_ data in the given range.
Depending in the random seed, actual range between minimum and maximum
generated values
may be smaller then one given by the properties.
Actual range is always calculated based on the data, including
TUserDefinedChartSource,
so there is no need to set it explicitly.

Anyway, it seems that it is really time to start writing some documentation.
I just did that -- see http://wiki.lazarus.freepascal.org/TAChart_documentation
Hope that clarifies things.

-- 
Alexander S. Klenin




More information about the Lazarus mailing list