Page 1 of 1

Log scale issue

Posted: Mon Jun 04, 2012 1:44 pm
by 9526439
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 8233 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 8226 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 8201 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

Re: Log scale issue

Posted: Tue Jun 05, 2012 10:02 am
by yeray
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.

Re: Log scale issue

Posted: Fri Jun 22, 2012 11:32 am
by 9526439
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

Re: Log scale issue

Posted: Mon Jun 25, 2012 3:13 pm
by yeray
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).