frxChartView

BJLBJL Brussels, Belgium
edited 3:29PM in FastReport 3.0
FR304 & BCB6

I work on a report including frxChartView. The chart uses LineSeries.
Because the number of series, as well as the number of points per series, depend of the user's choices, I need to add the series and the points dynamically. So, in the FR Chart Editor, there is no series; only the Chart with the default settings.

In the example I use for development, there are 3 series, each with 12 points.

After adding the series and the points, I have a piece of code allowing to check all points of all series (XLabel, YValue). So I know that the 3 series exist and are corectly populated.

The next instruction is PrepareReport. When the report appears, it shows only the gradient, the title, the axes, the label of the X axis, but nothing of the 3 series, except the 3 associated legends.

My question is: Is it possible that PrepareReport remove all series set in the BCB code?

BJL

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 3:29PM
    select the chart object rclck to bring up editor
    add series set type and props and fixeddata
    here is some sample code

    procedure Chart1OnBeforePrint(Sender: TfrxComponent);
    var
    fcount,indx,l2,l3:integer;
    begin
    l2 := Length(yv);
    l3 := Length(xv);

    fcount := currentyearfootercount;
    if (fcount < 12) and (fcount > 0) then
    begin
    for indx := fcount to 11 do
    begin
    yv3 := yv3 +'0;';
    end;
    end;

    with Chart1.SeriesData[0] do
    begin
    XSource := Copy(xv,0,l2-1) ;
    YSource := Copy(yv,0,l2-1);
    end;
    l2 := Length(yv2);
    with Chart1.SeriesData[1] do
    begin
    XSource := Copy(xv,0,l2-1) ;
    YSource := Copy(yv2,0,l2-1);
    end;
    l2 := Length(yv3);
    with Chart1.SeriesData[2] do
    begin
    XSource := Copy(xv,0,l2-1) ;
    YSource := Copy(yv3,0,l2-1);
    end;

    end;

    ;)

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.