Solved

give mark on the points in the chart

Posted on 2003-11-23
3
1,439 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

734 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