TChart component makes my app crash, why?

I am using Delphi 2005 Professional on WinXP

Drop a TChart component on the form, add a line series.

Add a button to the form with following handler:

Series1.AddXY(70,14500);
Series1.AddXY(71,14500);
Series1.AddXY(72,14500);
Series1.AddXY(73,14500);
Series1.AddXY(74,14500);

When you press the button in runtime the app crashes. Why?
It seems to happen when the y-values you enter are very high and all the same.
IgnaceLamineAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JaccoCommented:
If I add this it works for me

  Chart1.LeftAxis.Automatic := False;
  Chart1.LeftAxis.Maximum := 16000;
  Series1.AddXY(70,14500);
  Series1.AddXY(71,14500);
  Series1.AddXY(72,14500);
  Series1.AddXY(73,14500);
  Series1.AddXY(74,14500);

It seems that it has something to to with a bug in the automatic determination of the max/min.

Regards Jacco
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JaccoCommented:
Why grade B??
0
IgnaceLamineAuthor Commented:
An acceptable solution, cause I still need to find a way to deal with this bad behaviour in my app.  Setting it not automatic leaves me with other problems.
   

*  A: The Expert(s) either provided you with a thorough answer or they provided you with a link to information that thoroughly answered your question. An "A" can also be given to any answer that you found informative or enlightening beyond the direct question that you asked.

    * B: The Expert(s) provided an acceptable solution, or a link to an acceptable solution, that you were able to use, although you may have needed a bit more information to complete the task.

    * C: Because Experts' reliability are often judged by their grading records, many Experts would like the opportunity to clarify if you have questions about their solutions. If you have given the Expert(s) ample time to respond to your clarification posts and you have responded to each of their posts providing requested information; or if the answers, after clarification, lack finality or do not completely address the issue presented, then a "C" grade is an option. You also have the option here of just asking Community Support to delete the question.
0
JaccoCommented:
You didn't ask that. You asked:

"When you press the button in runtime the app crashes. Why?"

I think I anwered that. How could I have guessed you need additional information.

You could have asked...

Regards Jacco
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.