Hi Tracey.

I found this code snippet in the teechart help

 With Series1 do { <-- use a TBarSeries for example }
 begin
  XValues.Order:=loNone ;
  YValues.Order:=loDescending ;
  YValues.Sort ;
  XValues.FillSequence ;
  Repaint ;
end;

I loaded a series with random values ant put a button on a form that executed 
the above code and it did sort the series data as its supposed to.

Mabye you missed the repaint or missed seeeting the sorting of the xvalues to 
none forst so it was STILL working of that sorted list?

HTH

Chris


>>> [EMAIL PROTECTED] 8/03/2005 11:14:06 a.m. >>>
HorizBarSeries.YValues.Order := loDescending / loAscending;?
Tried it, doesn't work. I tried it before adding series, after adding
series, etc.

Here is what I am currently doing:

while not eof do
begin
    iIncidents := FieldByName('number_of_incidents').AsInteger;
    sWorkZoneName := FieldByName('Workzonename').AsString;
    AddHTML('<tr><td>' + sWorkZoneName +
'</td><td>More_data_for_report</td></tr>');
                          
    with FChart do
    begin
          with HorizBarSeries do
          begin
               Add(iIncidents, sWorkZoneName,  Random(2147483648));
           end;
    end; //with FChart
    Next;    //next record
end;  //while not eof
Bitmap := FChart.TeeCreateBitmap(clWhite, Rect);
FJPEG.Assign(Bitmap);
sTimestamp := FormatDateTime('dd_mm_yyy.hh_nn_ss', Now);

FJPEG.SaveToFile('c:\apache2\icons\incwzchart' + sTimestamp + '.jpg');
AddHTML('<div align=center><IMG alt="incidents/workzones"
Src="\icons\incwzchart' + sTimestamp + '.jpg"></div>');

So my report looks like this:

BERTH   177     10/01/2005      Text    
HULL RD YARD    176     24/12/2004      blurb blurb some
blurb   
KINLEITH CHECKPOINT     153     16/02/2004      More Blurb      
        172     22/12/2004      XXXX    
        173     22/12/2004      Jack broke his neck while trying to look
around a sharp corner. 
Medical Treatment Injury - Treatment sought = Hospital  
        174     21/12/2004      some descriptions stuff or something    
        175     07/12/2004      Bob suffered a bump when she stood up while
under the truck. 
Non-reportable Injury   
        179     18/01/2005      someone and nobody
test description here   
KINLEITH RAIL   154     18/02/2004      Sensitive data removed  
More.. you get the picture                              
Which produces this chart:                              







-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Veale
Sent: Tuesday, 8 March 2005 10:48 a.m.
To: [email protected] 
Subject: RE: [DUG] TChart order of data


ok
under the series (not the chart) there is a sort field that you can set to
ascending, descending or none.

HTH

Chris

>>> [EMAIL PROTECTED] 8/03/2005 10:39:14 a.m. >>>
My cgi app loops through a recordset, adding each value to an HTML table to
be displayed, then adding that value to a chart before moving to the next
record.  

The only way I can invert the order in which they are added to display them
in the same order as the table data, is to run the same query twice and
invert the return order.  

Surely there must be a way to flip the values in the serieslist?



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Chris Veale
Sent: Tuesday, 8 March 2005 10:32 a.m.
To: [email protected] 
Subject: Re: [DUG] TChart order of data


can you just add them in the opposite order?

Chris

>>> [EMAIL PROTECTED] 8/03/2005 10:05:01 a.m. >>>
Could someone tell me how to invert the order of the y axis data please?

 

I add each HorizBarSeries in the order of 1,2,3 and yet they display on the
chart in the order of 3,2,1

 


______________________________________________________

The contents of this e-mail are privileged and/or confidential to the
named recipient and are not to be used by any other person and/or
organisation. If you have received this e-mail in error, please notify 
the sender and delete all material pertaining to this e-mail.
______________________________________________________
_______________________________________________
Delphi mailing list
[email protected] 
http://ns3.123.co.nz/mailman/listinfo/delphi 



_______________________________________________
Delphi mailing list
[email protected] 
http://ns3.123.co.nz/mailman/listinfo/delphi 

______________________________________________________

The contents of this e-mail are privileged and/or confidential to the
named recipient and are not to be used by any other person and/or
organisation. If you have received this e-mail in error, please notify 
the sender and delete all material pertaining to this e-mail.
______________________________________________________
_______________________________________________
Delphi mailing list
[email protected] 
http://ns3.123.co.nz/mailman/listinfo/delphi

______________________________________________________

The contents of this e-mail are privileged and/or confidential to the
named recipient and are not to be used by any other person and/or
organisation. If you have received this e-mail in error, please notify 
the sender and delete all material pertaining to this e-mail.
______________________________________________________
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to