Lazarus
Programming => Graphics and Multimedia => Graphics => Topic started 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
-
Have you tried TAChart?
https://wiki.lazarus.freepascal.org/TAChart
-
If you never worked with TAChart before you should look at the Getting started tutorial:
- https://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Getting_started
"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:
- https://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Dual_y_axis,_Legend
- https://wiki.lazarus.freepascal.org/TAChart_Tutorial:_Multiple_Panes_in_one_Chart