Page 1 of 1

Contour Scaling Issue

Posted: Fri Jun 14, 2013 10:24 am
by 15663894
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

Re: Contour Scaling Issue

Posted: Fri Jun 14, 2013 2:04 pm
by 10050769
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 11342 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,

Re: Contour Scaling Issue

Posted: Mon Jun 17, 2013 8:15 am
by 15663894
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:

Re: Contour Scaling Issue

Posted: Mon Jun 17, 2013 9:35 am
by 10050769
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,

Re: Contour Scaling Issue

Posted: Mon Jun 17, 2013 10:38 am
by 15663894
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

Re: Contour Scaling Issue

Posted: Mon Jun 17, 2013 10:41 am
by 15663894
Sorry the file was too big, here it is

Re: Contour Scaling Issue

Posted: Mon Jun 17, 2013 3:19 pm
by 10050769
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,

Re: Contour Scaling Issue

Posted: Tue Jun 18, 2013 7:23 am
by 15663894
Thank you,

Best regards

Martin B