Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 668

Summary: Surface series palettestyle doesn't serialize all possible styles.
Product: .NET TeeChart Reporter: sdgr
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal CC: chris
Priority: ---    
Version: TeeChart.NET 2013 4.1.2013.11080   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: Surface 3D Delphi / C++ Builder RAD IDE Version:

Description sdgr 2014-03-27 04:41:29 EDT
Hi,
I have a Surface series and set the PaletteStyle property to 'Strong'.
Saving the chart and reloading it, the PaletteStyle is set to the first style in the list, which is 'Pale' (this is wrong), but my surface series doesn't show like it is 'Pale' (it shows my surface in 2 colors, instead of using the palette).

Saving a Surface series with PaletteStyle property = 'Pale', does the same as explained above.

Saving a Surface series with PaletteStyle='Grayscale' or 'InvertedGray' or 'Rainbow' and reloading it afterwards, does display correctly!

This doesn't happen only to a Surface series, it happens also for ColorGrid series, ...

Is there a workaround?

Stefan.
Comment 1 christopher ireland 2014-03-27 05:43:29 EDT
Hello,

This bug is now fixed. In the meantime, as a workaround, you can derive your own surface class to mitigate the problem.

    MySurface series;
    private void InitializeChart()
    {
      series = new MySurface(tChart1.Chart);
      series.FillSampleValues();

      series.UseColorRange = false;
      series.UsePalette = true;
      series.PaletteStyle = PaletteStyles.Strong;
    }

    private void button1_Click(object sender, EventArgs e)
    {
      MemoryStream ms = new MemoryStream();
      tChart1.Export.Template.Save(ms);
      ms.Position = 0;

      tChart2.Import.Template.Load(ms);
      MessageBox.Show(((Surface)tChart2[0]).PaletteStyle.ToString());
    }

  public class MySurface : Surface
  {
    public MySurface(Chart c) : base(c)
    {
      PaletteStyle = PaletteStyles.Strong;
    }
  }
Comment 2 sdgr 2014-03-27 06:50:57 EDT
Hi,

Thanks for the update.
I assume that the solution will be added to the next available release?
Any idea when the next is sheduled?

Stefan.
Comment 3 christopher ireland 2014-03-28 10:08:19 EDT
The last release was on the 24th of February - I would expect the next release to be made public on or around the 24th of April.