problem using logarythmic in the chart
problem using logarythmic in the chart
We use teechart v7.0.0.4
we use much logarthmic and automatic scaling in our charts.
The problem is, that this scaling doesn't lookgood the most times, or worse, it is wrong.
When we use logarthymic scaling, min value of the left axis start from 1 and not 0 so labels of values that are less than 0, are displayed beneath the chart instead of on it. lavels that are for value 0 are displayed on the chart although there is no 0 value in the left axis.
Is there a place I can upload sceenshots to explain our problem?
Thanks
Zoe.
we use much logarthmic and automatic scaling in our charts.
The problem is, that this scaling doesn't lookgood the most times, or worse, it is wrong.
When we use logarthymic scaling, min value of the left axis start from 1 and not 0 so labels of values that are less than 0, are displayed beneath the chart instead of on it. lavels that are for value 0 are displayed on the chart although there is no 0 value in the left axis.
Is there a place I can upload sceenshots to explain our problem?
Thanks
Zoe.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
First of all, please notice there are much newer TeeChart Pro v7 ActiveX releases available at the client area. Could you please try uninstalling v7.0.0.4, download and install v7.0.1.4 and check if the problem persists?
If so, please send us a simple example project we can run "as-is" to reproduce the problem here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
First of all, please notice there are much newer TeeChart Pro v7 ActiveX releases available at the client area. Could you please try uninstalling v7.0.0.4, download and install v7.0.1.4 and check if the problem persists?
If so, please send us a simple example project we can run "as-is" to reproduce the problem here.
You can either post your files at news://www.steema.net/steema.public.attachments newsgroup or at our upload page.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Thank you for your fast reply.
I have uploaded soem images, there is no way for me at the moment to upload a small project.
Please note, that all chart use the exact same design!
BUG_25289_1.jpg) it seems that the left axis is at 0, which is the only good thing in this report, but there are no bars, the bars would start at the middle of the screen and the values 0 and 1 are at the same level.
BUG_25289_2.jpg) We set the lefty axis scaling to be logarythm 10. the min value is set to 0 but in the chart you see 1 and we get values (marks) between 0 and 1 which overlap with the bottom-axis-label and values (the mark with the value 0.67). also mark with the value 0 are above mark with the value 0.67 which is not logical. it is impossible to read this chart.
BUG_25289_3.jpg) This time there is a 0 value, but it overlaps with the legend
thanks
Zoe
I have uploaded soem images, there is no way for me at the moment to upload a small project.
Please note, that all chart use the exact same design!
BUG_25289_1.jpg) it seems that the left axis is at 0, which is the only good thing in this report, but there are no bars, the bars would start at the middle of the screen and the values 0 and 1 are at the same level.
BUG_25289_2.jpg) We set the lefty axis scaling to be logarythm 10. the min value is set to 0 but in the chart you see 1 and we get values (marks) between 0 and 1 which overlap with the bottom-axis-label and values (the mark with the value 0.67). also mark with the value 0 are above mark with the value 0.67 which is not logical. it is impossible to read this chart.
BUG_25289_3.jpg) This time there is a 0 value, but it overlaps with the legend
thanks
Zoe
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
Thanks for the information.
Thanks in advance.
You could use the solution on previous reply or use OnGetAxisLabel event to hide the zero label, for example:
Thanks for the information.
It's very difficult for us guessing which is the problem here without seeing how the chart is created and being able to reproduce and debut the issue here. We would really appreciat if you could arrange a simple example project we can run "as-is" to reproduce the problem here.BUG_25289_1.jpg) it seems that the left axis is at 0, which is the only good thing in this report, but there are no bars, the bars would start at the middle of the screen and the values 0 and 1 are at the same level.
Thanks in advance.
You can try setting left axis minimum to zero:BUG_25289_2.jpg) We set the lefty axis scaling to be logarythm 10. the min value is set to 0 but in the chart you see 1 and we get values (marks) between 0 and 1 which overlap with the bottom-axis-label and values (the mark with the value 0.67). also mark with the value 0 are above mark with the value 0.67 which is not logical. it is impossible to read this chart.
Code: Select all
TChart1.Axis.Left.AutomaticMinimum = False
TChart1.Axis.Left.Minimum = 0
BUG_25289_3.jpg) This time there is a 0 value, but it overlaps with the legend
You could use the solution on previous reply or use OnGetAxisLabel event to hide the zero label, for example:
Code: Select all
Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
If Axis = 0 And LabelText = "0" Then
LabelText = ""
End If
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
If I send you a .tee file that is defined as the problem, can that be enough for you to check?Quote:
BUG_25289_1.jpg) it seems that the left axis is at 0, which is the only good thing in this report, but there are no bars, the bars would start at the middle of the screen and the values 0 and 1 are at the same level.
It's very difficult for us guessing which is the problem here without seeing how the chart is created and being able to reproduce and debut the issue here. We would really appreciat if you could arrange a simple example project we can run "as-is" to reproduce the problem here.
that is the problem, the minimum is set to 0 yet we do not see it.Quote:
BUG_25289_2.jpg) We set the lefty axis scaling to be logarythm 10. the min value is set to 0 but in the chart you see 1 and we get values (marks) between 0 and 1 which overlap with the bottom-axis-label and values (the mark with the value 0.67). also mark with the value 0 are above mark with the value 0.67 which is not logical. it is impossible to read this chart.
You can try setting left axis minimum to zero:
Code:
TChart1.Axis.Left.AutomaticMinimum = False
TChart1.Axis.Left.Minimum = 0
minimum here i sset to 0 as well yet the chart starts from 1 and the 0 is at the legend. the point is to make the left axis show the bottom chart line at the minimum value (0) and not at 1.Quote:
BUG_25289_3.jpg) This time there is a 0 value, but it overlaps with the legend
You could use the solution on previous reply or use OnGetAxisLabel event to hide the zero label, for example:
Code:
Private Sub TChart1_OnGetAxisLabel(ByVal Axis As Long, ByVal SeriesIndex As Long, ByVal ValueIndex As Long, LabelText As String)
If Axis = 0 And LabelText = "0" Then
LabelText = ""
End If
End Sub
thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
Tee files may help. We will check them here.
Thanks in advance.
Tee files may help. We will check them here.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
Thanks for the files.
1. I could reproduce the issue here using your file but I'm not able to reproduce it from scratch using code below. Could you please modify the code so that we can reproduce the issue here?
2 and 3. Work fine for me here using TeeChart Pro v7.0.1.4 ActiveX.
Thanks for the files.
1. I could reproduce the issue here using your file but I'm not able to reproduce it from scratch using code below. Could you please modify the code so that we can reproduce the issue here?
Code: Select all
Private Sub Form_Load()
TeeCommander1.Chart = TChart1
TChart1.AddSeries scBar
TChart1.AddSeries scBar
TChart1.AddSeries scBar
TChart1.AddSeries scBar
TChart1.Series(0).Add 0, "", clTeeColor
TChart1.Series(0).Add 0, "", clTeeColor
TChart1.Series(1).Add 0, "", clTeeColor
TChart1.Series(1).Add 1, "", clTeeColor
TChart1.Series(2).Add 1, "", clTeeColor
TChart1.Series(2).Add 0, "", clTeeColor
TChart1.Series(3).Add 1, "", clTeeColor
TChart1.Series(3).Add 1, "", clTeeColor
End Sub
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
Thanks for the example project. It seems to me that it's working fine here using TeeChart Pro v7.0.1.4 ActiveX. Are those the results you expected?
Linear scale:
Logarithmic scale:
Thanks in advance.
Thanks for the example project. It seems to me that it's working fine here using TeeChart Pro v7.0.1.4 ActiveX. Are those the results you expected?
Linear scale:
Logarithmic scale:
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hello,
Minimum left axis value is set to 0 so chart numbers should start from 0. As you can see in the second screen shot (the problematic one), the botton line starts from 1 and not from 0, so the 0.67 mark falls bellow the line. In the first screen shot you can see that the left axis bottom line starts from 0 as it should.
thank you for your fast reply.
Zoe
Minimum left axis value is set to 0 so chart numbers should start from 0. As you can see in the second screen shot (the problematic one), the botton line starts from 1 and not from 0, so the 0.67 mark falls bellow the line. In the first screen shot you can see that the left axis bottom line starts from 0 as it should.
thank you for your fast reply.
Zoe
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Zoe,
Thanks for the information.
This is because for logarithms values need to be greater than 0 and log(1)=0. In that case you can set left axis minimum to 0.1 when left axis is logarithmic.:
Thanks for the information.
This is because for logarithms values need to be greater than 0 and log(1)=0. In that case you can set left axis minimum to 0.1 when left axis is logarithmic.:
Code: Select all
private void SetMinMax()
{
axTChart1.Axis.Left.Minimum = 0;
axTChart1.Axis.Left.Maximum = 171;
}
private void button1_Click(object sender, EventArgs e)
{
axTChart1.Axis.Left.Logarithmic = true;
axTChart1.Axis.Left.LogarithmicBase = 10;
axTChart1.Axis.Left.Minimum = 0.1;
}
private void button2_Click(object sender, EventArgs e)
{
axTChart1.Axis.Left.Logarithmic = false;
axTChart1.Axis.Left.Minimum = 0;
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |