Make single events visible in long line charts

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
bfrost
Newbie
Newbie
Posts: 7
Joined: Fri Mar 12, 2004 5:00 am
Location: United Kingdom

Make single events visible in long line charts

Post by bfrost » Thu Sep 01, 2005 1:58 pm

Sorry if this has been asked before but I have a need to ensure that when display a line chart of many similar points (eg 10,000 points of say value = 100) that a single different numeric event (say value = 0) is visible even when looking at the entire chart as well as when zoomed in. It seems to me that this must be a common requirement when assessing chart data visually for issues. Can I implement this easily?
Regards,
Brian

SteveP
Advanced
Posts: 132
Joined: Sun Sep 07, 2003 4:00 am

Post by SteveP » Thu Sep 01, 2005 2:31 pm

Using a LineSeries with Ver 7.04, I see the single different data value no matter what size the chart's form is. There are options for faster plotting the use different methods of decimation that may or may not show the single different value.

for i := 1 to 10000 do series1.AddY(100);
series1.YValue[5000] := 0;

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Sep 01, 2005 2:31 pm

Hi Brian,

Yes, this can be easily achieved. Just place a TChart on a form and add a TLineSeries to it, do following code will do the rest. You'll easily see the point at (5000, -100) and this will be visible when zooming that area.

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var
  i: Integer;
begin
  Chart1.View3D:=False;
  Randomize;

  With Series1 do
  begin
    for i:=0 to 10000 do Add(random*100);
    AddXY(5000,-100);
    Pointer.Visible:=True;
  end;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply