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 266

Summary: [TV52016060] If I add the points to a TSurfaceSeries with color, and I add a TSurf...
Product: VCL TeeChart Reporter: yeray alonso <yeray>
Component: ChartAssignee: Steema Issue Manager <issuemanager>
Status: CONFIRMED ---    
Severity: major    
Priority: Normal    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description yeray alonso 2013-11-20 10:35:24 EST
If I add the points to a TSurfaceSeries with color, and I add a TSurfaceNearestTool, the series is drawn correctly the first time it is drawn, but it changes to use the colors of the palette as soon as I move the mouse over the series.
uses TeeSurfa, TeeSurfaceTool;
procedure TForm1.FormCreate(Sender: TObject);
var col: TColor;
    x, z, m, n: Integer;
    y, range: Double;
begin
  m:=5;
  n:=5;
  range:=255 / (m * n);
  with Chart1.AddSeries(TSurfaceSeries) as TSurfaceSeries do
  begin
    for x:=1 to m do
    begin
      for z:=1 to n do
      begin
        y:=x*z;
        col:=RGB(Round(y*range), Round(y*range), 0);
        AddXYZ(x, y, z, '', col);
      end;
    end;
  end;
  (Chart1.Tools.Add(TSurfaceNearestTool) as TSurfaceNearestTool).Series:=Chart1[0];
end; [created:2012-03-01T14:20:48.000+01:00 reported by:yeray@steema.com reported in version:2011.04.41118 (TeeChart VCL)]