Surface Series Palette Problem

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

Surface Series Palette Problem

Post by jenb » Tue Mar 17, 2009 9:16 am

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.

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

Post by Sandra » Tue Mar 17, 2009 11:31 am

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?
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

jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

Post by jenb » Tue Mar 17, 2009 4:02 pm

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?

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

Post by Narcís » Wed Mar 18, 2009 2:52 pm

Hi jenb,

Yes, in that case you need to set IrregularGrid=true as described here.
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

jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

Post by jenb » Fri Mar 20, 2009 9:01 am

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

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

Post by Narcís » Fri Mar 20, 2009 3:48 pm

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.
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

jenb
Newbie
Newbie
Posts: 50
Joined: Thu Jun 21, 2007 12:00 am

Post by jenb » Mon Mar 23, 2009 9:16 am

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

Yeray
Site Admin
Site Admin
Posts: 9587
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Post by Yeray » Mon Mar 23, 2009 2:23 pm

Hi jenb,

I could reproduce the problem and I've added it to the wish list to be fixed in future releases (TF02013997).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply