I have uploaded an example project called ChartLogrithamicBug It charts 7 point series. 6 are visible and have 1 point in each series. The 7th series has 2 points but the points are made invisible with a transparency = 100.
Here is a picture of what is charted
http://tinyurl.com/4rmvna
on the vertical axis, notice there is no tick marks. Zooming will make some tick marks show up.
1. Why is there no tick marks?
2. Why does panning only pan horizontally and not vertical?
3. How do you post pictures? I tried using the Img tag around the URL and it did not work.
Logarithmic scale with small numbers results bad axis labels
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike,
This is because values are very similar and there's no significative differences between them in a logarithimic scale. Same would happen with non-logarithmic axes and a series with a constant y value (all y values being the same), in that case the constant y value would be represented as a single label. In that case, logarithmic labels would be: 1, 10, 100, 1000, etc. Since chart values are lower than 1 no label is plotted. To solve this you can add code below to your example.1. Why is there no tick marks?
Code: Select all
tChart1.Axes.Left.Labels.ValueFormat = "#,##0.00";
tChart1.Axes.Left.Increment = 0.001;
This is because left axis minimum and maximum are almost the same you could solve that manually setting axes min. and max. values:2. Why does panning only pan horizontally and not vertical?
Code: Select all
tChart1.Axes.Left.SetMinMax(0, 5);
Putting image's URL between img tags works fine for me:3. How do you post pictures? I tried using the Img tag around the URL and it did not work.
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 |
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
Not sure I understand
I am surprised that there are no labels on the left axis as you can see in the picture. Shouldn't there at least be 0.0, or the min/max values labeled? Instead it is just blank. That appears to be a bug to me.This is because values are very similar and there's no significative differences between them in a logarithimic scale. Same would happen with non-logarithmic axes and a series with a constant y value (all y values being the same), in that case the constant y value would be represented as a single label. In that case, logarithmic labels would be: 1, 10, 100, 1000, etc. Since chart values are lower than 1 no label is plotted. To solve this you can add code below to your example.
Hmmm. Strange. I tried the url in between the tags and when I previewed it did not show the image. Maybe this is a limitation of preview.Putting image's URL between img tags works fine for me:
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike,
I've added this (TF02013469) to the defect list to be investigated.I am surprised that there are no labels on the left axis as you can see in the picture. Shouldn't there at least be 0.0, or the min/max values labeled? Instead it is just blank. That appears to be a bug to me.
Preview also worked fine for me. Notice that I used images URL not entire Picasa page URL. For getting image's URL I right-clicked on it and chose "Copy Image Location" in FireFox, same feature exists in IE.Hmmm. Strange. I tried the url in between the tags and when I previewed it did not show the image. Maybe this is a limitation of preview.
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 Mike,
As a follow up to the issue above, we have found that a workaround is setting invisible series to non-Active instead of making it transparent, for example:
Notice that labels problem may be solved using MaximumOffset as shown above.
As a follow up to the issue above, we have found that a workaround is setting invisible series to non-Active instead of making it transparent, for example:
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
tChart1.Aspect.View3D = false;
tChart1.Axes.Left.Logarithmic = true;
tChart1.Axes.Left.MaximumOffset = 50;
for (int i = 0; i < 7; i++)
{
tChart1.Series.Add(new Steema.TeeChart.Styles.Points());
}
tChart1[6].Active = false;
//tChart1[6].Color = Color.Transparent;
tChart1[0].Add(12, 0.080688476);
tChart1[1].Add(14, 0.06408694);
tChart1[2].Add(16, 0.050903320);
tChart1[3].Add(18, 0.040405273);
tChart1[4].Add(20, 0.0318860351);
tChart1[5].Add(24, 0.020141601);
tChart1[6].Add(11.4, 0);
tChart1[6].Add(24.6, 1);
}
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 |
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
What is MaximumOffset?
What exactly is the purpose for MaximumOffset and what does it do?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Mike
MaximumOffset is the amount of pixels that will be left as a margin at axis maximum position. This property is useful when you dont want the series to display points very close to axis boundaries.
MaximumOffset is the amount of pixels that will be left as a margin at axis maximum position. This property is useful when you dont want the series to display points very close to axis boundaries.
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 |