?
Solved

give mark on the points in the chart

Posted on 2003-11-23
3
Medium Priority
?
1,470 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 90 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

Independent Software Vendors: 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

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…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month8 days, 7 hours left to enroll

764 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