Contour Scaling Issue

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
MartinB
Newbie
Newbie
Posts: 8
Joined: Tue Oct 30, 2012 12:00 am

Contour Scaling Issue

Post by MartinB » Fri Jun 14, 2013 10:24 am

Hello,

I use the WPF version of TeeChart (4.1.2012.09280 ) and I would like to plot a contour type chart.

I use a regulard grid to fill the chart, and it seems when the property FillLevels is set to true, there is a vertical axis problem.

In fact the value supposed to control the color is virtually added on the chart with the wrong position ( The x position is fine, but the y position gets the z value ) which leads to a scaling problem, everything is compressed to the bottom.

I think there is a bug here, and in order to reproduce it you can simply create a chart with defaults settings, add a contour serie, activate the FillLevels and add something like :

for (int i = 1; i <= 10; i++)
{
for (int y = 1; y <= 10; y++)
{
m_Contour.Add(i, i*y, y);
}
}

Instead of getting the maximum left axis value equals to 10, it is 100.

Maybe this is fixed in the new version from february ?

Thank you

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

Re: Contour Scaling Issue

Post by Sandra » Fri Jun 14, 2013 2:04 pm

Hello MartinB,

I have made a simple code:

Code: Select all

 private void InitializeChart()
        {
            tChart1.Aspect.View3D = false;
            Steema.TeeChart.WPF.Styles.Contour m_Contour = new Steema.TeeChart.WPF.Styles.Contour(tChart1.Chart);
            tChart1.Aspect.View3D = false;
            m_Contour.FillLevels = true; 
            for (int x = 1; x <= 10; x++)
            {
                for (int z = 1; z <= 10; z++)
                {
                    int y = x * z;
                    m_Contour.Add(x, y, z);
                }           
            }
}
And using this I have gotten next image:
ContourSeries.jpg
ContourSeries.jpg (75.58 KiB) Viewed 11349 times
Therefore, using latest version seems your problem with axis left doesn't appear. Could you please check my code and confirm us it works fine for you when you use latest version of TeeChartFor.Net?

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

MartinB
Newbie
Newbie
Posts: 8
Joined: Tue Oct 30, 2012 12:00 am

Re: Contour Scaling Issue

Post by MartinB » Mon Jun 17, 2013 8:15 am

Hello Sandra, thank your for your answer.

Unfortunately, I updated my version to 4.1.2012.1312 and I still have the same problem.

I used your code, and this time I soon as I resize my window or I unzoom, the chart becomes this:
Attachments
teeChartIssue.png
teeChartIssue.png (32.84 KiB) Viewed 11326 times

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

Re: Contour Scaling Issue

Post by Sandra » Mon Jun 17, 2013 9:35 am

Hello MartinB,

Can you please attached for us a simple project because we can find your problem here and try to suggests a solution for you?

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

MartinB
Newbie
Newbie
Posts: 8
Joined: Tue Oct 30, 2012 12:00 am

Re: Contour Scaling Issue

Post by MartinB » Mon Jun 17, 2013 10:38 am

Sure, I attached the project.

You can see that at first, it is correctly displayed, and as soon as I resize the window several "contour1" appear in the legend and I have the scaling problem.

Thank you
Attachments
teeChartIssue2.png
teeChartIssue2.png (31.94 KiB) Viewed 11294 times
teeChartIssue1.png
teeChartIssue1.png (35.57 KiB) Viewed 11296 times

MartinB
Newbie
Newbie
Posts: 8
Joined: Tue Oct 30, 2012 12:00 am

Re: Contour Scaling Issue

Post by MartinB » Mon Jun 17, 2013 10:41 am

Sorry the file was too big, here it is
Attachments
DemoContourTeeChartIssue.rar
(50.91 KiB) Downloaded 529 times

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

Re: Contour Scaling Issue

Post by Sandra » Mon Jun 17, 2013 3:19 pm

Hello MartinB,

Seems there is a bug in WPF version. I have added it in bug list report with number [TW16016607]. We will try to fix it to upcoming versions of TeeChartFor.Net.

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

MartinB
Newbie
Newbie
Posts: 8
Joined: Tue Oct 30, 2012 12:00 am

Re: Contour Scaling Issue

Post by MartinB » Tue Jun 18, 2013 7:23 am

Thank you,

Best regards

Martin B

Post Reply