Download Now

    Reference TCustomGraph

    Declared in Codebot.Render.Widgets.Custom.pas on line 33

    TCustomGraph is the base class for scrolling line graphs
      TCustomGraph = class(TCustomWidget)
      protected
        function DefaultColor: TColorF; virtual;
        function DefaultMax: Double; virtual;
        function DataPoint: Double; virtual;
        function InfoText: string; virtual;
        procedure Paint(Stage: TPaintStage); override;
        property Max: Double read FMax;
      public
        constructor Create(Parent: TWidget; const Name: string = ''); override;
        { Update takes the next data points. It is called each time the graph is
          painted, so it does not need to be called by a scene. }
        procedure Update; virtual;
        { The time in seconds between data points }
        property FrameMeasure: Double read FFrameMeasure write FFrameMeasure;
        { The distance in pixels between data points }
        property Step: Float read FStep write FStep;
        { The room kept at the left of the graph for its label }
        property LabelMargin: Float read FLabelMargin write FLabelMargin;
      end;

    See also

    Float in Codebot.System.pas
    TColorF in Codebot.Graphics.Types.pas
    TCustomWidget in Codebot.Render.Widgets.pas
    TPaintStage in Codebot.Render.Widgets.pas
    TWidget in Codebot.Render.Widgets.pas