Some long standing bugs

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
axrDegen
Newbie
Newbie
Posts: 31
Joined: Mon Jan 14, 2019 12:00 am

Some long standing bugs

Post by axrDegen » Wed Dec 04, 2019 10:30 am

Hello,

Here is a project showing 3 bugs that I noticed already for a long time and that are somehow not getting fixed in any release:
1) The position of the title of the Depth Right axis is completely OFF (for OpenGL mode)
2) The Mark Tips tool doesn't work at all in 3D OpenGL mode (No hints get shown)
3) It is impossible to switch ON/OFF series in the Legend when the Chart/TeeCommander mode is different from Select mode, which is very disturbing. In 2D mode it is well possible to zoom AND use the Legend for switching on/off series.

Are there any fixes for that?

best regards,

Thomas
Attachments
TChartBugs.zip
Project showing 3 bugs
(54.33 KiB) Downloaded 315 times

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

Re: Some long standing bugs

Post by Yeray » Wed Dec 11, 2019 3:13 pm

Hello,
axrDegen wrote:
Wed Dec 04, 2019 10:30 am
1) The position of the title of the Depth Right axis is completely OFF (for OpenGL mode)
Right. That's an old ticket:
http://bugs.teechart.net/show_bug.cgi?id=697
I've incremented its priority.
axrDegen wrote:
Wed Dec 04, 2019 10:30 am
2) The Mark Tips tool doesn't work at all in 3D OpenGL mode (No hints get shown)
I can't find a ticket exactly matching this description but I find some tickets that look related:
http://bugs.teechart.net/show_bug.cgi?id=804
http://bugs.teechart.net/show_bug.cgi?id=1262
http://bugs.teechart.net/show_bug.cgi?id=1929
axrDegen wrote:
Wed Dec 04, 2019 10:30 am
3) It is impossible to switch ON/OFF series in the Legend when the Chart/TeeCommander mode is different from Select mode, which is very disturbing. In 2D mode it is well possible to zoom AND use the Legend for switching on/off series.
I can't find a ticket reporting this earlier. Do you have a reference?
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

axrDegen
Newbie
Newbie
Posts: 31
Joined: Mon Jan 14, 2019 12:00 am

Re: Some long standing bugs

Post by axrDegen » Wed Dec 11, 2019 6:11 pm

Hello Yeray,

No, I actually don't have a reference for the 3rd bug. It is so obvious and disturbing when you use a 3D Chart that I thought it must be listed somewhere.
These checkboxes should be either clearly disabled/grayed out when not accessible or they should just work.

best regards,

Thomas

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

Re: Some long standing bugs

Post by Yeray » Thu Dec 12, 2019 4:40 pm

Yeray wrote:
Wed Dec 11, 2019 3:13 pm
Right. That's an old ticket:
http://bugs.teechart.net/show_bug.cgi?id=697
I've incremented its priority.
I've found a possible fix for this. You just have to add a "-" sign to the "glTranslatef(-x,y,-z)" call in the TGLCanvas.RotateLabel3D function in TeeGLCanvas.pas:

Code: Select all

procedure TGLCanvas.RotateLabel3D(x,y,z:Integer; Const St:String; RotDegree:Double;
                                  AllowHTML:Boolean=False);
begin
  glPushMatrix;
  glTranslatef(x,-y,0);
  glRotatef(RotDegree,0,0,1);
  glTranslatef(-x,y,-z);
  TextOut(X,Y,St);
  glPopMatrix;

  Assert(CheckGLError,'RotateLabel3D');
end;
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

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

Re: Some long standing bugs

Post by Yeray » Thu Dec 12, 2019 4:59 pm

Hello again,
axrDegen wrote:
Wed Dec 04, 2019 10:30 am
3) It is impossible to switch ON/OFF series in the Legend when the Chart/TeeCommander mode is different from Select mode, which is very disturbing. In 2D mode it is well possible to zoom AND use the Legend for switching on/off series.
I've added it to the public tracker here:
http://bugs.teechart.net/show_bug.cgi?id=2270

However, I don't see any difference between 2D and 3D modes.
- In 2D & normal mode selected, you can draw a zoom rectangle and you can use the legend checkboxes.
- In 3D & normal mode selected, you can draw a zoom rectangle and you can use the legend checkboxes.
- In 2D & zoom mode selected, you can zoom the chart but the legend checkboxes don't work.
- In 3D & zoom mode selected, you can zoom the chart but the legend checkboxes don't work.

It also does the same in GDIPlus.
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

axrDegen
Newbie
Newbie
Posts: 31
Joined: Mon Jan 14, 2019 12:00 am

Re: Some long standing bugs

Post by axrDegen » Thu Dec 12, 2019 5:21 pm

Hi Yeray,

the change in TGLCanvas.RotateLabel3D indeed fixes the position of the axis label but still, the orientation is obviously wrong:
WrongOrientationCapture.PNG
Wrong orientation of depth axis label
WrongOrientationCapture.PNG (34.26 KiB) Viewed 12860 times
Can you please fix that too?
The label should like all others run along the axis.

Thanks and best regards,

Thomas

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

Re: Some long standing bugs

Post by Yeray » Fri Dec 13, 2019 10:06 am

Hello,

You can set the Depth axis angle to zero:

Code: Select all

    TheChart.DepthAxis.Title.Angle:=0;
This angle is 270 by default for both OpenGL, GDI and GDIPlus. Changing that default could brake other customers projects who may be expecting it to be 270.
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

axrDegen
Newbie
Newbie
Posts: 31
Joined: Mon Jan 14, 2019 12:00 am

Re: Some long standing bugs

Post by axrDegen » Fri Dec 13, 2019 10:53 am

Hi Yeray,

No, that doesn't help, the Title still shows a wrong alignment:
WrongAlignmentCapture.PNG
wrong alignment
WrongAlignmentCapture.PNG (25.35 KiB) Viewed 12853 times
The Title should run parallel to the axis, like the Titles of all other axes,
this title rotates perpendicular to the axis around the axis.

Thomas

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

Re: Some long standing bugs

Post by Yeray » Fri Dec 13, 2019 1:50 pm

Hello,

I don't think that would look nice:
ChartBugs_2019-12-13_14-47-24.png
ChartBugs_2019-12-13_14-47-24.png (21.93 KiB) Viewed 12847 times
Note the labels and the title for that depth axis wouldn't be in the same plane.
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

axrDegen
Newbie
Newbie
Posts: 31
Joined: Mon Jan 14, 2019 12:00 am

Re: Some long standing bugs

Post by axrDegen » Mon Dec 16, 2019 10:08 am

Hello Yeray,

that is indeed bad, I had expected it to look something like that:
LatestCapture.PNG
LatestCapture.PNG (50.46 KiB) Viewed 12791 times
best regards,

Thomas

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

Re: Some long standing bugs

Post by Yeray » Tue Dec 17, 2019 11:08 am

Hello,

That could be achieved incrementing the font size. However, the axis title would be in a plane perpendicular to the labels for the same axis. So, if you rotate the chart to see the title from the front, you won't be able to read the labels.
ChartBugs_2019-12-17_12-07-01.png
ChartBugs_2019-12-17_12-07-01.png (14.37 KiB) Viewed 12779 times

Code: Select all

uses OpenGL2;

Code: Select all

procedure TForm2.FillTheScoreChart(TheChart: TChart; Color: TColor; Title: string; IsVisible: Boolean);
//...
    TheChart.DepthAxis.Title.Font.Size:=15;
    TheChart.DepthAxis.Title.Visible:=False;
  //...

Code: Select all

procedure TForm2.PLSScoresChartAfterDraw(Sender: TObject);
var x, y, z, RotDegree: Integer;
begin
  with PLSScoresChart.Axes.Depth do
  begin
    RotDegree:=Title.Angle;
    x:=PosTitle;
    y:=PLSScoresChart.ChartRect.Bottom-Round(PLSScoresChart.ChartHeight*ZPosition*0.01);
    z:=PLSScoresChart.Width3D div 2;

    glPushMatrix;
    glTranslatef(x,0,0);
    glRotatef(-RotDegree,0,1,0);
    //glTranslatef(-x,0,0);
    PLSScoresChart.Canvas.Font.Assign(Title.Font);
    PLSScoresChart.Canvas.TextOut(Z-20,Y+15,Title.Text);
    glPopMatrix;
  end;
end;
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

axrDegen
Newbie
Newbie
Posts: 31
Joined: Mon Jan 14, 2019 12:00 am

Re: Some long standing bugs

Post by axrDegen » Tue Dec 17, 2019 3:04 pm

Hi Yeray,

Ok, that looks a lot better and correct now.

> if you rotate the chart to see the title from the front, you won't be able to read the labels.
That's fine because if you don't rotate the chart you can't read anything else on the Z(depth)-axis either.
If you want to see and read all 3 axes you need to rotate the chart into the shown position, then all axes are evenly exposed.
CorrectTitlesCapture.PNG
CorrectTitlesCapture.PNG (18.52 KiB) Viewed 12773 times
Now the code should be fixed so that this gets the default behavior for the axes titles.
So we wouldn't need to put extra code in the OnAfterDraw event.

best regards,

Thomas

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

Re: Some long standing bugs

Post by Yeray » Wed Dec 18, 2019 8:08 am

Hello Thomas,
axrDegen wrote:
Tue Dec 17, 2019 3:04 pm
Now the code should be fixed so that this gets the default behavior for the axes titles.
So we wouldn't need to put extra code in the OnAfterDraw event.
I closed the ticket with the fix I proposed here, which draws the title in the same plane with the rest of texts, not following the axis direction as you require.
That's the reason why I posted code you can use to draw the title as you'd expect.
Maybe we could add some extra property to control how the depth axis title should be aligned. We'll study what alternatives we have here.
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

axrDegen
Newbie
Newbie
Posts: 31
Joined: Mon Jan 14, 2019 12:00 am

Re: Some long standing bugs

Post by axrDegen » Thu Dec 19, 2019 8:12 am

Hi Yeray,

An extra property would be great!
Now I have to put this OnAfterDraw event with extra code all over the place, everywhere where TChart is used in the codebase.
It would be much better to fix this problem in ONE place.
Also, an extra property would not break old code/behavior.
It would be great if the other 2 problems (in the beginning of this thread) could get solved too,

best regards,

Thomas

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

Re: Some long standing bugs

Post by Yeray » Fri Dec 20, 2019 10:09 am

Hello Thomas,
axrDegen wrote:
Thu Dec 19, 2019 8:12 am
An extra property would be great!
Now I have to put this OnAfterDraw event with extra code all over the place, everywhere where TChart is used in the codebase.
It would be much better to fix this problem in ONE place.
Also, an extra property would not break old code/behavior.
I agree and I've added the request to the public tracker #2272. As you can see, there's a number of related things to consider.
axrDegen wrote:
Thu Dec 19, 2019 8:12 am
It would be great if the other 2 problems (in the beginning of this thread) could get solved too,
I understand.
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

Post Reply