Solved

give mark on the points in the chart

Posted on 2003-11-23
3
1,411 Views
Last Modified: 2008-02-01
Hi all,

I want to ask, is there any way to give marks at the points in my TChart series ? (I used fast line to draw the graph)

one more thing, Im curious what's the different between fastline series and line series

Thank you ^^
0
Comment
Question by:allie910
  • 2
3 Comments
 
LVL 2

Expert Comment

by:odissey1
ID: 9814502
Hi allie910,

First the secons Q. FastLineSeries: No pointers (circles, squares, ...). Draws ~10 times faster. Could be assigned dynamically to array (not poit-by-point as AddXY(x,y), but the whole dynamic array at once). It has no 3D 'volume' though - if 3D enabled this will be still 'flat' line, wile regular Series will have 'brick'-like appearance.
In TLineSeries you can colot each pointer different color. Se table below. It is simple: if you need to plot real-time (oscilloscope) you use FastLine, regular chart - TLineSeries (more features)

 TLineSeries  |  TFastLineSeries |  Options
  >10 sec          0.5 sec                 Drawing 1000000 points
  No                 Yes                       Functions FastDelete & FastPen
  No                 Yes                       Dynamic Arrays
  Yes                No                        3D - style look
  Yes                No                        Can show pointers (square, triangle) at each [X,Y]
  Yes                No                        Color each pointer (square, triangle) individ. color
  Yes                ?                          Line/ponter clickable        
  Yes                No                       Can use image pattern (bitmaps) along the line
  Yes                No                       Could be stacked (on on top of another)
   ..                  ..                         should be more but those are fine details    
Second:
To enable Marks Open ChartEditor->Add Series-> Click Series Tab -> Click Marks -> click VISIBLE.
Or Series1.Marks.Visible:=True; (like that at least)

Regards,
odissey1
0
 

Author Comment

by:allie910
ID: 9822297
ahaaa!!!
ok odissey1, thats answer my other question why I cant find the 'pointer' option..... humm... so I have to use the Line series instead of fastline series huh...?? so I've been sweating for nothing this time -_-; heuhuhe NVM now I know anyway =p

ok... now I'm changing to TLineSeries.. hehe cos' I have to show some dots instead of the value mark, but the problem if how to show the dots in runtime..?? because I create the series in run time so, I can't define my pointer using Chart editor...

any solution..??

thank you again ;)
0
 
LVL 2

Accepted Solution

by:
odissey1 earned 30 total points
ID: 9823111
Hi allie910,

this should run:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,
  ExtCtrls, TeeProcs, TeEngine, Chart, Series;

type
  TForm1 = class(TForm)
    Chart1: TChart;
    ChartEditor1: TChartEditor;
    procedure FormCreate(Sender: TObject);
    procedure Chart1DblClick(Sender: TObject);
  private
    { Private declarations }
    function Series1GetPointerStyle(Sender: TChartSeries;
    ValueIndex: Integer): TSeriesPointerStyle;

  public
    { Public declarations }
  end;

var
  Form1: TForm1;
  ASeries: TLineSeries;

implementation

{$R *.dfm}

function TForm1.Series1GetPointerStyle(Sender: TChartSeries;
  ValueIndex: Integer): TSeriesPointerStyle;
begin
  if ValueIndex mod 2=0
  then result:=psNothing
  else result:=psTriangle;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Chart1.AddSeries(TLineSeries);
  ASeries:=TLineSeries(Chart1[0]);
  ASeries.FillSampleValues(10);
  ASeries.Pointer.Visible:=True; //will show squares by default

  //if assigned then will draw custom pointers
  ASeries.OnGetPointerStyle:=Series1GetPointerStyle;
end;

end.


Regards,
odissey1
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question