Logarithmic scaling issue

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Logarithmic scaling issue

Post by Snarkle » Thu Jan 27, 2011 12:05 am

Hi All,

Attached is a project of a price chart with an option to view it in logarithmic mode. When the chart is viewed in logarithmic mode the scaling disappears and the chart doesn't seem to be modified.

Is this a known bug or have I not setup the chart correctly to display in logarithmic mode?

Thanks.
Attachments
LogChart.zip
(54.99 KiB) Downloaded 408 times
--------------------
Cheers Phil.

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: Logarithmic scaling issue

Post by Sandra » Thu Jan 27, 2011 11:34 am

Hello Phil,

I have tested your project and here I have obtained results below:

Image1: Not Log Left Axis
ChartAxesnotLog.jpeg
ChartAxesnotLog.jpeg (57.71 KiB) Viewed 8523 times
Image2: Log Left Axis
ChartAxesLog.jpeg
ChartAxesLog.jpeg (50.8 KiB) Viewed 8517 times
I think that behaviour of Chart is correct using last version of TeeChart.Net 2010. If you are using TeeChart.Net 2010 and you don't believe results are correct, please explain us why, so we can help you. On the other hand, if you don't use last version TeeChart.Net 2010 please, tell us which version of TeeChart you are using now.

Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: Logarithmic scaling issue

Post by Snarkle » Sun Jan 30, 2011 11:05 pm

Hi Sandra,

Your screen shots are different to what my chart displays, especially the scaling on the non log screen shot. I have posted screen shots of what my chart looks like in non log and log. The version of TeeChart used for the sample applicaiton is 4.1.2010.11301.
Attachments
Log.jpg
Log
Log.jpg (146.26 KiB) Viewed 8502 times
No Log.jpg
Non Log
No Log.jpg (146.26 KiB) Viewed 8503 times
--------------------
Cheers Phil.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Logarithmic scaling issue

Post by Narcís » Mon Jan 31, 2011 11:57 am

Hi Phil,

I'm taking up on this issue because Sandra is out of the office this week.

I get the same behavior as Sandra using both our current TeeChart for .NET 2010 sources and latest maintenance release available at the client area, which is the version you say you are using. However, checking your zip package, I see that TeeChart.dll in \bin\Debug folder it's build number 4.0.0.30714, which doesn't coincide with any of the binary releases we have published. I have checked that you are a source code customer so I assume this is an assembly you built from the sources. Can you please confirm that? Can you please check if the problem persists with latest binary release available at the client area? What we get is what you expect?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: Logarithmic scaling issue

Post by Snarkle » Mon Jan 31, 2011 10:56 pm

Hi Narcís,

I've added a reference to the latest tChart.dll (4.1.2010.11301) and re-uploaded my project. With this reference I still get the same issue as originally reported (scale disappears and chart shape doesn't change when going into log mode).

Do you get the same screen shot as what I posted with log mode off? If not, could you post a sample project using the latest dll release to see if I get the same behaviour as you.

Thanks.
Attachments
LogChart.zip
(15.45 KiB) Downloaded 402 times
--------------------
Cheers Phil.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Logarithmic scaling issue

Post by Narcís » Tue Feb 01, 2011 8:35 am

Hi Phil,

Thanks for the sample project. I'll do the test you requested but I have a problem with the files you sent. You didn't include the "Properties" folder and the project can not be compiled. Could you please resend the project or just this folder? "bin" and "obj" folders can be removed but not "Properties" folder.

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: Logarithmic scaling issue

Post by Snarkle » Tue Feb 01, 2011 11:32 pm

Sorry about that Narcís, attached is the project again.
Attachments
LogChart.zip
(16.91 KiB) Downloaded 355 times
--------------------
Cheers Phil.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Logarithmic scaling issue

Post by Narcís » Wed Feb 02, 2011 9:09 am

Hi Phil,

Thanks for the files. I'm still getting the same as Sandra using it. I just added the reference to TeeChart.dll build 4.1.2010.11303, which is the latest release for VS2010. Then I changed project's target framework to 4.0 as build 4.1.2010.11303 is for that framework, compiled the application and got the screen-shots below. Actually I also added some code to export the images. Find also attached the project with the changes I told you. Following those steps do you get the same as we do? Please notice that Visual Studio may not be using the TeeChart assembly you think, I recommend you to remove TeeChart's AssemblyFolders entry as I described here before starting VS2010.
NoLog.png
NoLog.png (80.5 KiB) Viewed 8454 times
Log.png
Log.png (64.93 KiB) Viewed 8452 times
Attachments
LogChart.zip
(6.68 KiB) Downloaded 408 times
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Snarkle
Newbie
Newbie
Posts: 91
Joined: Wed Jun 30, 2010 12:00 am

Re: Logarithmic scaling issue

Post by Snarkle » Wed Feb 02, 2011 11:13 pm

Hi Narcís,

I've downloaded your project but still don't get the same screen shots as you. I'm using 4.1.2010.11301 of the DLL instead of 4.1.2010.11303. Would this make a difference?

Also, I can't see how you get your screen (with Log off) as you seem to have 2 different scales on the left hand side. You have 0 to 800 and then another scale from 1.000 up to 4.600. The min and max values being plotted however are 35.58 and 46.59 so I don't know if you are using another data set to populate the chart?

Thanks.
--------------------
Cheers Phil.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Logarithmic scaling issue

Post by Narcís » Thu Feb 03, 2011 9:20 am

Hi Phil,

Sorry, my bad. Now I have found which was the difference between your project and hours. I had to set my regional settings to English (US) to get the same as you get. I guess my settings (Catalan) were interpreting decimal and thousand separators in a different way. I think the problem is that no logarithmic labels as your data goes from 35.5 to 46.5 approximately. This means they don't fall into a range that a logarithmic label (1, 10, 100, 1000, etc.) label is displayed. I modified your code a little bit to modify left axis minimum and maximum values when it's logarithmic so that labels are displayed:

Code: Select all

        private void button1_Click(object sender, EventArgs e)
        {
            if (SemiLogActive == false)
            {
                tChart1.Axes.Left.Logarithmic = true;
                tChart1.Axes.Right.Logarithmic = true;
                tChart1.Axes.Left.LogarithmicBase = 10;
                tChart1.Axes.Right.LogarithmicBase = 10;
                tChart1.Axes.Left.SetMinMax(10, 100);
                tChart1.Refresh();
                SemiLogActive = true;
                button1.Text = "Turn Off Semi Log";

                GetScreenShot("Log.png");
            }
            else
            {
                tChart1.Axes.Left.Logarithmic = false;
                tChart1.Axes.Right.Logarithmic = false;
                tChart1.Axes.Left.Automatic = true;
                tChart1.Refresh();

                button1.Text = "Turn On Semi Log";
                SemiLogActive = false;

                GetScreenShot("NoLog.png");
            }
        }
Another alternative would be using custom labels. You can find an example at All Features\Welcome !\Axes\Labels\Custom labels in the features demo, available at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply