Min / Max view in Bar Graph?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
moelski
Advanced
Posts: 212
Joined: Mon Apr 23, 2007 12:00 am
Location: Germany
Contact:

Min / Max view in Bar Graph?

Post by moelski » Mon Apr 14, 2008 5:48 am

Hi !

I have a chart with one bar graph (like in the picture). I only show one value in this chart but this value will be updated every second.

Code: Select all

  Val := TrackBar1.Position / 10 - 20;
  Chart1[0].BeginUpdate;
  Chart1[0].Clear;
  Chart1[0].AddXY(Val, 0);
  Chart1[0].EndUpdate;
  Chart1.Title.Caption := FloatToStr(Val);
Is it possible to have an indicator for the minimum and maximum value that was shown within the chart?

Example:
Image

I have an actual value of 50. The smallest value that was shown within the chart was 25 and the biggest value was 65.

Is this possible? And is it possible to access the Min / Max values for further usage in the code (something like this ... Chart[0].MinMaxIndicator.Min)?

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Apr 14, 2008 9:49 am

Hi Dominik,

I think you could use a line series to do this (with Pointer.Visible activated) with two points, for example. You could use two variables to store the global minimum and maximum, and modify XValue[0] or XValue[1] from you line series when those variables are updated.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply