Solved

give mark on the points in the chart

Posted on 2003-11-23
3
1,382 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now