BoxPlot Initial Paint seems to be wrong

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
MicroSolutions
Newbie
Newbie
Posts: 4
Joined: Mon May 18, 2020 12:00 am

BoxPlot Initial Paint seems to be wrong

Post by MicroSolutions » Fri Sep 11, 2020 2:56 pm

Hello,

If I add some values for a BoxPlot series , where the minimum is grater than 0, the BoxPlot is not painted correctly for the first time.
If I move around with the mouse, the scale and painting is fixed. (then the Chart repaints itself)

e.g:

Code: Select all

  for I:=0 to 30 do begin
    self.Series1.Add(I+100);
  end;
.Repaint .Invalidate does not solve this issue.

Do You know any workaround to get rid of this problem?

Thanks in advance:
MicroSolutions

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

Re: BoxPlot Initial Paint seems to be wrong

Post by Yeray » Wed Sep 16, 2020 6:13 am

Hello,

Try forcing a repaint calling Chart1.Draw;.
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

MicroSolutions
Newbie
Newbie
Posts: 4
Joined: Mon May 18, 2020 12:00 am

Re: BoxPlot Initial Paint seems to be wrong

Post by MicroSolutions » Thu Sep 17, 2020 11:39 am

Hello,

Thx for the answer, but unfortunately it does not seems to work.
What is very interesting, if I call Chart.Draw in a separate function, it works.
If I call Chart.Draw directly after adding the values, it does not work.

Any Idea?
Can You reproduce the issue on Your side?

Regards:
MicroSolutions

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

Re: BoxPlot Initial Paint seems to be wrong

Post by Yeray » Fri Sep 18, 2020 5:29 am

Hello,

No I can't reproduce it. Could you please arrange a simple example project we can run as-is here?
Thanks in advance.
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

MicroSolutions
Newbie
Newbie
Posts: 4
Joined: Mon May 18, 2020 12:00 am

Re: BoxPlot Initial Paint seems to be wrong

Post by MicroSolutions » Fri Sep 18, 2020 9:10 am

Hello,

Sure.
I have attached a simple project.

Best Regards:
MicroSolutions
Attachments
BoxPlotDrawIssue.zip
(53.67 KiB) Downloaded 1030 times

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

Re: BoxPlot Initial Paint seems to be wrong

Post by Yeray » Tue Sep 29, 2020 7:47 am

Hello,

You are right, Chart1.Draw isn't enough with this kind of series because this series min and max doesn't correspond to the y values min and max. It needs Series1.RecalcStats to be called instead.
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

MicroSolutions
Newbie
Newbie
Posts: 4
Joined: Mon May 18, 2020 12:00 am

Re: BoxPlot Initial Paint seems to be wrong

Post by MicroSolutions » Wed Sep 30, 2020 7:59 am

Yes, Series1.RecalcStats did the trick!
Thank You!

Post Reply