Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

give mark on the points in the chart

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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

618 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