Page 1 of 1

Surface Series Palette Problem

Posted: Tue Mar 17, 2009 9:16 am
by 13045625
I am using a surface series with regular grid. 100 x points, and 50 y points. All z values are between 0 and 1. I followed one of your examples for the surface series to set the palette type.

When the chart is first displayed it shows the strong palette which is correct, but as soon as I interact with the chart, e.g. to rotate, then the palette changes to a single color.

If I use z values with a larger range (e.g. 1 to 100000) then the problem doesn't occur, but here when the palette changes the legend doesn't keep in step with it.

I uploaded 2 examples to your site: Display1.jpg and Display2.jpg to show the problem for values between 0 and 1.

Posted: Tue Mar 17, 2009 11:31 am
by 10050769
Hello jenb,

We reproduce next code and working well with last version of TeeChart .NET:

Code: Select all

            Steema.TeeChart.Tools.Rotate r = new Steema.TeeChart.Tools.Rotate(tChart1.Chart);
            Steema.TeeChart.Styles.Surface surface1 = new Steema.TeeChart.Styles.Surface(tChart1.Chart);
            Random y = new Random();
            for (int i = 0; i <= 100; ++i)
            {
                for (int j = 0; j <= 50; ++j)
                {
                    surface1.Add(i, y.NextDouble(), j);
                }
            }



            surface1.UseColorRange = false;
            surface1.UsePalette = true;
            surface1.PaletteStyle = Steema.TeeChart.Styles.PaletteStyles.Strong;
Please, check previous code works correctly and change this code because we can check exactly where your code fails.

Also, please you could say what version of TeeChart for .NET are you use?

Posted: Tue Mar 17, 2009 4:02 pm
by 13045625
Dear Sandra

I was using 3.5.3274.30664, I've now upgraded to the latest version, 3.5.3330.21112. It now seems ok. Maybe the problem was that I was using a lower value for the x and z axes of 1, not 0?

Posted: Wed Mar 18, 2009 2:52 pm
by narcis
Hi jenb,

Yes, in that case you need to set IrregularGrid=true as described here.

Posted: Fri Mar 20, 2009 9:01 am
by 13045625
Hi Narcis

I'm still getting the palette problem. It may be due to the interaction of the chart and the nearest line tool, sometimes all cells go the same color in the series, e.g. if I click on a cell on the bottom right and then drag the cursor over the chart from bottom right to top left. All cells and legend items then display the same color. It's not a major problem, and can be cleared, e.g. by resetting the palette, but for a chart with a lot of cells then it can be a bit awkward and slow to update. I've posted a class that shows the problem on your upload site, MapControl.zip. Also I have another question about the grid for colorgrid and surface series that I'm posting separately.

Regards

jenb

Posted: Fri Mar 20, 2009 3:48 pm
by narcis
Hi jenb,

Thanks for the example code but I'm not able to run it here because I get this error:
Error 10 The type or namespace name 'SpectrumClasses' could not be found (are you missing a using directive or an assembly reference?) C:\TestApps\VS2008\WindowsFormsApplication1\WindowsFormsApplication1\MapControl.cs 70 34 WindowsFormsApplication1
I'm afraid we don't have SpectrumClasses here. Could you please send us a simple example project we can run "as-is" to reproduce the problem here?

Thanks in advance.

Posted: Mon Mar 23, 2009 9:16 am
by 13045625
Hi Narcis

I posted a solution, MapDisplay.zip, on your upload site. If you build and run the solution then the chart will be displayed. To show the problem, firstly rotate the chart to show the view from the top then left mouse click near the botton right corner of the chart, Then move the mouse across the chart (with no buttons pressed) and left mouse click near the top left corner. I find that all cells of the chart turn blue, and the legend is changed as well. Selecting another palette from the combo box doesn't work.

Best Regards

jenb

Posted: Mon Mar 23, 2009 2:23 pm
by yeray
Hi jenb,

I could reproduce the problem and I've added it to the wish list to be fixed in future releases (TF02013997).