Sorting the Bars on a Barchart
Sorting the Bars on a Barchart
Hi,
(Im using Teechart through Digital Metaphors Report Builder.)
I have a barchart where the bars are sorted left to right from smallest bar to largest bar.
How do I change it so that I sort the bar names across the x-axis in their aplhabetical order?
Thanks
Red
(Im using Teechart through Digital Metaphors Report Builder.)
I have a barchart where the bars are sorted left to right from smallest bar to largest bar.
How do I change it so that I sort the bar names across the x-axis in their aplhabetical order?
Thanks
Red
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi,
Thanks but this inst working.
In the code section the only procedure available for the DPTeeChart object is 'OnPrint'
When I enter
Series1.SortByLabels(loAscending);
The error messgae is
"Error:DPTeeChart1OnPrint, Line3: Undeclared indentifier: 'Series1'."
The series on my chart IS called Series1.
What might the problem be?
Thanks
Red
Thanks but this inst working.
In the code section the only procedure available for the DPTeeChart object is 'OnPrint'
When I enter
Series1.SortByLabels(loAscending);
The error messgae is
"Error:DPTeeChart1OnPrint, Line3: Undeclared indentifier: 'Series1'."
The series on my chart IS called Series1.
What might the problem be?
Thanks
Red
Hi.
Series Title? But what about IDE generated Name ? Check if Series1 is listed in the form IDE managed section list. If no, you can still reference series by it's position in your chart Series array. ExampleThe series on my chart IS called Series1.
Code: Select all
YourChart.Series[0].SortByLabels(loAscending);
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hi.
You could try a shorter version:
Precisely If this is the case then the following should work fine:by IDE generated name I guess you mean
'DPTeeChart1'?
Code: Select all
DPTeeChart1.Series[0].SortByLabels(loAscending);
Code: Select all
DPTeeChart1[0].SortByLabels(loAscending);
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
Hi.
Hm... I don't have RB installed on my machine so I'm not 100% sure what the class structure for RB chart is. Back in the old RB 7 days there was a TppChart.Chart class which allowed direct access to all TDBChart properties. Check if DPTeeChart has a .Chart (or similar) property. If yes, then all you must do is insert .Chart after the DPTeeChart1:
I think RB also has some nice examples about accessing TDBChart properties. Also, some clues might be available in Report Builder help files and tutorials.
If you still can't make it work, please send me your form dfm file (saved as text) + pas file so that I can see exactly what is created and how it's being accessed. You can send it to my "marjan at steema dot com" email address.
Hm... I don't have RB installed on my machine so I'm not 100% sure what the class structure for RB chart is. Back in the old RB 7 days there was a TppChart.Chart class which allowed direct access to all TDBChart properties. Check if DPTeeChart has a .Chart (or similar) property. If yes, then all you must do is insert .Chart after the DPTeeChart1:
Code: Select all
DPTeeChart1.Chart.Series[0].SortByLabels(loAscending);
If you still can't make it work, please send me your form dfm file (saved as text) + pas file so that I can see exactly what is created and how it's being accessed. You can send it to my "marjan at steema dot com" email address.
Marjan Slatinek,
http://www.steema.com
http://www.steema.com
OK,
Im running RB 9.01.
I do not have the TppChart.Chart class.
I tried that code anyway. It did not work.
I do not have access to RB help or Teechart help modules unforturnately.
And I do not have access to the dfm or pas files.
So now, all I can do is email you a screen shot or my coding area, to see if you can figure anything.
Ill will email to you in a few minutes
Hvala,
Red
Im running RB 9.01.
I do not have the TppChart.Chart class.
I tried that code anyway. It did not work.
I do not have access to RB help or Teechart help modules unforturnately.
And I do not have access to the dfm or pas files.
So now, all I can do is email you a screen shot or my coding area, to see if you can figure anything.
Ill will email to you in a few minutes
Hvala,
Red