How I can create series in a chart in runtime?

I have an empty TfrxChartView and want to add series to it in runtime. How I make?

I am creating serie in the following way:
     n := 0;
     while  ...  do
     begin
       Inc(n);
       Serie: = TLineSeries.Create (Chart1.Chart);
       Serie.Active := True;                                                   
       Serie.Title := TitleName;
       .  .  .
       .  .  .
       Chart1.SeriesData[n-1].XSource := XValues;  
       Chart1.SeriesData[n-1].YSource := YValues;
     end;

But when I execute the report the chat is blank.

Leave a Comment