Page 1 of 1

Contour plot based on SQL-query

Posted: Mon Dec 15, 2014 9:39 am
by 16563504
Hi all,

I want to create a contour plot which is linked to an SQL-query.
I'm wondering what will happen, if the query yields multiple values for a given x and y coordinate?
Will only the first or last value be plotted or is an average calculated?

Thanks for a hint

Norbert

Re: Contour plot based on SQL-query

Posted: Mon Dec 15, 2014 2:22 pm
by yeray
Hi Norbert,

You should avoid adding repeated values, they aren't allowed as you can read in the procedure SearchXValue at TeeSurfa.pas:

Code: Select all

    // Adds unique values of "AValue" to "Values" array.
    // Repeated values aren't allowed.
    Procedure SearchXValue(const Value:TChartValue);
    begin
      if SearchSorted(Value,XCount,XVals)=-1 then
      begin
        XVals[XCount]:=Value;
        Inc(XCount);
      end;
    end;