Search Results for

    Show / Hide Table of Contents

    Chart completion from Script

    Let's look at how to construct the previous chart using a script. Leave the Label and Y fields empty in the chart editor. In the report script enter the following code:

    PascalScript:

    begin
      Chart1.SeriesData[0].XSource := 'Jan;Feb;Mar;Apr';
      Chart1.SeriesData[0].YSource := '31;28;31;30';
    end.
    

    C++Script:

    {
      Chart1.SeriesData[0].XSource = "Jan;Feb;Mar;Apr";
      Chart1.SeriesData[0].YSource = "31;28;31;30";
    }
    

    "SeriesData[0]" in this case allows us to set parameters for the first series in the chart. If the chart has more than one series then refer to them with "SeriesData[1]", etc.

    Back to top © 1998-2022 Copyright Fast Reports Inc.