Grouping of data in a legend
Grouping of data in a legend
I have a requirement to group the data in the Legend. How can this be achieved.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi usc,
Could you please give us some more detailed information on what you are trying to achieve?
Thanks in advance.
Could you please give us some more detailed information on what you are trying to achieve?
Thanks in advance.
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 Narcis
I am sorry I guess my question was wrong as I had understood the requirement of my project wrongly.
The exact question I would like to ask you is:
Can I sort the text in the chart legend in a custom manner(say for example alphabetically or in a group.
For example : I have the text in the legend as
Grp1:well1:Production
Grp1:well2:Support
Grp2:well1:Production
Grp2:well1:Support
I would want to sort the legend text as:
Grp1:well1:Production
Grp2:well1:Production
Grp1:well2:Support
Grp2:well1:Support
I hope I have made myself clear. You can refer to the image Chart_Legend for any reference or get back to me in case you have any clarifications.
Thanks and Regards
Usc
[/img]
I am sorry I guess my question was wrong as I had understood the requirement of my project wrongly.
The exact question I would like to ask you is:
Can I sort the text in the chart legend in a custom manner(say for example alphabetically or in a group.
For example : I have the text in the legend as
Grp1:well1:Production
Grp1:well2:Support
Grp2:well1:Production
Grp2:well1:Support
I would want to sort the legend text as:
Grp1:well1:Production
Grp2:well1:Production
Grp1:well2:Support
Grp2:well1:Support
I hope I have made myself clear. You can refer to the image Chart_Legend for any reference or get back to me in case you have any clarifications.
Thanks and Regards
Usc
[/img]
Hi usc
The values of the legend are sorting with the order which have been added. If you want to order alphabetically then the solution is drawing a custom legend on TeeChart's canvas using its Rectangle and TextOut methods. You can also add checkboxes to this custom legend.
You can find examples on how to custom draw on TeeChart's canvas at All Features\Welcome !\Canvas\ in TeeChart's features demo. The demo is available at TeeChart's program group.
The values of the legend are sorting with the order which have been added. If you want to order alphabetically then the solution is drawing a custom legend on TeeChart's canvas using its Rectangle and TextOut methods. You can also add checkboxes to this custom legend.
You can find examples on how to custom draw on TeeChart's canvas at All Features\Welcome !\Canvas\ in TeeChart's features demo. The demo is available at TeeChart's program group.
Hi usc
You can sort the series, as below method:
The legend will be sorted too.
You can sort the series, as below method:
Code: Select all
tChart1.Series.Exchange(0, 1);
Hi Edu
Please find the document Legend Ordering.Doc
for your reference to the sorting problem I am facing in my project.
I have specified, how the data is currently being sorted and what is my requirement in the document.
Also, I have a query. Can I stop sorting of the series in the legend.Whenever i add a series to the chart, it gets added and sorted to the legend automatically.
Request you to kindly help me out in this problem,
Thanks and Regards,
Usc
Please find the document Legend Ordering.Doc
for your reference to the sorting problem I am facing in my project.
I have specified, how the data is currently being sorted and what is my requirement in the document.
Also, I have a query. Can I stop sorting of the series in the legend.Whenever i add a series to the chart, it gets added and sorted to the legend automatically.
Request you to kindly help me out in this problem,
Thanks and Regards,
Usc
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi usc,
Series are displayed in the legend in the order they are added to the chart. Have you tried sorting them changing series order on the chart using Exchange method Edu suggested?
Thanks in advance.
Series are displayed in the legend in the order they are added to the chart. Have you tried sorting them changing series order on the chart using Exchange method Edu suggested?
Thanks in advance.
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 |