AddSeries method on TfrxChartView not working

I'm using PascalScript and FR4 and I keep getting an access violation when I try to add a line series to my chart dynamically in the script. Here is basically my code:

var
Chart2: TfrxChartView;
LS: TLineSeries;

Chart2 := TfrxChartView.Create(GroupFooter1);
Chart2.SetBounds(10,110,125,125);
LS:=TLineSeries.Create(Chart2);
Chart2.Chart.AddSeries(LS);

I noticed in alot of the online help that it looks like it should just be "Chart2.AddSeries" but I get an error saying AddSeries does not exist. Access violation happens right as I try to add the series to my chart. Does ANYONE have any clue on why AddSeries isn't working for me? Any thoughts are welcome.

Thanks

Comments

  • edited 1:49PM
    I don't know about creating Chart from FR Script

    but I know Chart.AddSeries works if you call it from Delphi
      Chart2 := TfrxChartView.Create(GroupFooter1);
      Chart2.Name := 'MyChart';
      Chart2.SetBounds(10,110,125,125);
      Chart2.AddSeries(csLine);
    

    Perhaps you can use an UserFunction so that the Chart is create at the Delphi level.
  • edited 1:49PM
    Thanks for the input - but I really do need to do it from the script. Charts will be placed in a sub group footer and it's never consistent on how many charts I will need at any given run. Is there anything I need to do to "activate" the methods, like AddSeries, in the TfrxChartView class?
    Selmeyer wrote: »
    I don't know about creating Chart from FR Script

    but I know Chart.AddSeries works if you call it from Delphi
      Chart2 := TfrxChartView.Create(GroupFooter1);
      Chart2.Name := 'MyChart';
      Chart2.SetBounds(10,110,125,125);
      Chart2.AddSeries(csLine);
    

    Perhaps you can use an UserFunction so that the Chart is create at the Delphi level.
  • edited 1:49PM
    Can anyone confirm or deny that it is impossible?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.