• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 303
  • Last Modified:

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.
0
IgnaceLamine
Asked:
IgnaceLamine
  • 3
1 Solution
 
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
 
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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now