TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
-
santycg
- Newbie

- Posts: 15
- Joined: Mon Aug 13, 2007 12:00 am
Post
by santycg » Wed Dec 03, 2008 6:52 pm
Hi!
I'm using TeeChart 8.04 and ReportBuilder 11.
I'm trying the DBChart component for ReportBuilder.
I have designed a SQL report (you can see the SQL statement and the query result here

).
Although I set the result order via SQL, the Chart bars are always shown with a different order (see image 2 here:

)
How can I change the order of the bars to respect the original one?
Thanks!
-
Narcís
- Site Admin

- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Thu Dec 04, 2008 10:22 am
Hello santycg,
You may need to set bar series YValues order to none and XValues order to be ascending before populating them, for example
Code: Select all
Series1.XValues.Order:=loAscending;
Series1.YValues.Order:=loNone;
//Populate your series here
This is how series are set by default but TeeChart's ReportBuilder wrapper or something else in the project can be changing this.
If this doesn't work you can try running code below after populating series.
Code: Select all
Series1.XValues.Sort
Series1.YValues.Sort;
Hope this helps!
-
santycg
- Newbie

- Posts: 15
- Joined: Mon Aug 13, 2007 12:00 am
Post
by santycg » Thu Dec 04, 2008 10:29 am
Hi, Narcís...
Is it possible to modify those values in the Chart Editor window?
I can't change it by code because they are pre-designed report templates.
Where can I change order values in the Chart Editor window?
Thanks!
-
Narcís
- Site Admin

- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
-
Contact:
Post
by Narcís » Thu Dec 04, 2008 10:40 am
Hi santycg,
In the chart editor only YValues order can be set. However this may be enough as your bar series seem to sort Y values descendingly.
You can set this going to Series -> General -> Sort.