Log scale issue

TeeChart for ActiveX, COM and ASP
Post Reply
amol
Advanced
Posts: 231
Joined: Tue Mar 29, 2005 5:00 am

Log scale issue

Post by amol » Mon Jun 04, 2012 1:44 pm

Hi,

There are few issues we are coming across w.r.t. log scale when applied on any plot. Following is the scenario on which the issue arises.

1. Normal Plot without apply Log scale (Working fine)
See in Pic1.jpeg
Pic1.jpg
1st poic
Pic1.jpg (66.26 KiB) Viewed 8231 times
2. When we check “Log Scale Left Y Axis” and “Log Scale Right Y Axis”, both the axis i.e. left and right are shifted below the end of the chart as shown below.
as in pic2.jpeg
Pic2.jpg
second pic
Pic2.jpg (140.98 KiB) Viewed 8224 times
3. When we adjust left axis position by adjusting End% as shown through the settings below, it looks like as shown in figure below.
pic3.jpeg
pic3.jpg
pic 3ed
pic3.jpg (164.76 KiB) Viewed 8199 times
4. When we adjust left axis position by adjusting End% as shown through the settings below, it looks like as shown in figure below.
as in pic4.jpeg
Following is the code executed when log scale checkboxes are checked / unchecked
if(logScaleLeftXis.GetCheck())
m_chart1.GetAxis().GetLeft().SetLogarithmic(TRUE);
else
m_chart1.GetAxis().GetLeft().SetLogarithmic(FALSE);

Please suggest if any further setting needs to be done to by default stop the left and right scale to reach below the end of t-chart after log scale is selected.

Regards,
Amol

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

Re: Log scale issue

Post by Yeray » Tue Jun 05, 2012 10:02 am

Hi Amol,

I'm afraid the 4th picture has been lost, probably due to the 3 attachments per post limitation in these forums.

I'm trying to reproduce the problem here but the following code seems to work fine for me here (VB6 code).

Code: Select all

Private Sub Form_Load()
  TChart1.Aspect.View3D = False
  
  TChart1.AddSeries scFastLine
  
  Dim i As Integer
  For i = 0 To 2500
    TChart1.Series(0).AddXY i, i, "", clTeeColor
  Next i
  
  TChart1.Axis.Left.Logarithmic = True
  TChart1.Panel.MarginUnits = muPixels
  TChart1.Panel.MarginBottom = 100
End Sub
I may be missing some relevant setting so it would be helpful if you could arrange a simple example project we can run as-is to reproduce the problem here.
thanks in advance.

PS: I've edited your post to move each picture next to the according explanation.
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

amol
Advanced
Posts: 231
Joined: Tue Mar 29, 2005 5:00 am

Re: Log scale issue

Post by amol » Fri Jun 22, 2012 11:32 am

Hi Yeray

We researched the issue and found that it occurs only on specific sizes and data. One such combination is there in the project I am attaching with this post. We have one more data set which I may be able to upload on Monday.

It would be great if we can get a solution or workaround.

Thanking you in advance.

Yours Sincerely
Amol
Attachments
TeeChartMFC.7z
VC++ 2005 Project
(67.84 KiB) Downloaded 694 times

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

Re: Log scale issue

Post by Yeray » Mon Jun 25, 2012 3:13 pm

Hi Amol,

I think I understand what's happening. It seems that the labels are not clipped to the according axis size when it's a logarithmic axis, so extra labels are drawn out of the ChartRect if there's enough margin. I've added it to the list (TV52016231).
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