Lazarus

Programming => Graphics and Multimedia => Graphics => Topic started by: Nera on February 18, 2020, 05:31:33 pm

Title: Chart with 14 lines and 3 scales
Post by: Nera on February 18, 2020, 05:31:33 pm
Good afternoon people.

I need to make a chart with 14 lines and 3 scales. Which component do you indicate for this function?
I would like it to be a native component, but if not, indicate an opensource component.

Thanks
Title: Re: Chart with 14 lines and 3 scales
Post by: Handoko on February 18, 2020, 05:41:27 pm
Have you tried TAChart?

https://wiki.lazarus.freepascal.org/TAChart
Title: Re: Chart with 14 lines and 3 scales
Post by: wp on February 18, 2020, 06:17:20 pm
If you never worked with TAChart before you should look at the Getting started tutorial:

"14 lines": A "series" in TAChart is a presentation of a variety of (x,y) pairs. A TLineSeries connects the data points by straight line segments. So you need to add 14 series to the chart. But there are also cubic spline and b-splite series which can draw smooth curves between the data points.

Alternatively, if data points on all series share the same x values, you can use a single series and adjust it such that it allows for 14 y values for each x value.

"3 scales": You can add two more y axes so that there are 3 y axes, in total. You also need so-called chart transformations which are responsible to accomplish the mapping of the 3 y data scales onto a common graph scale. The procedure how to set this up is explained in two tutorials:
TinyPortal © 2005-2018