0

I am trying to create a line graph of an exponential function:

  j:=IWcmbxCriterionName.ItemIndex;

     p1a:=(-5000)*0.001;
     p1c:= -(Exp(P1a * Min[j])) /  (Exp(P1a * Max[j]) - Exp(P1a * Min[j]));
     p1b := (1 - P1c) / Exp(P1a * Max[j]);
     k1 := Max[j];
     i1 := Min[j];
     while i1 <= k1 do
       begin
         Serie1.AddXY(i1, P1b * Exp(p1a * (i1)) + p1c,'',clWebBLUE);  
         i1 := i1 + 0.01;
       end;
     chart1.BottomAxis.Maximum:=k1;
     chart1.BottomAxis.Minimum:= min[j];
     chart1.UndoZoom;

but the serie1 not appear on the graph! Can someone can help me?

1 Answers1

0

Remove the lines where you set bottom axis min. and max. and try to set i to automatic just in case those values are wrong:

  Chart1.BottomAxis.Automatic:=True;

If the problem persists please send us a simple example project we can run "as-is" to reproduce the problem here. You can post your files at our upload page.

Narcís Calvet
  • 7,304
  • 5
  • 27
  • 47