How to add data in TfrxChartVew by code

johnnixjohnnix Serrai, Greece
edited 9:44AM in FastReport 3.0
Greetings to all,

Can anyone please share some code on how to add data values on a Chart object by code?

Thank you very much for your time

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 9:44AM
    one could read the user manual.
    assuming you have created a series in the chart object and selected fixed data type
    Chart completion from Script

    leave empty XValues and YValues fields in chart editor. In report script obp event of chart object write the following:

    begin
    Chart1.SeriesData[0].XSource := 'January;February;Маrch;Арril';
    Chart1.SeriesData[0].YSource := '31;28;31;30';
    end.
    SeriesData[0] in this case allows us to set parameters for the first series in the chart. If chart has several series, you can address them via SeriesData[data_number].

    ;)

Leave a Comment