Page 1 of 1

Min / Max view in Bar Graph?

Posted: Mon Apr 14, 2008 5:48 am
by 9349911
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)?

Posted: Mon Apr 14, 2008 9:49 am
by yeray
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.