Sorting crosstab series

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Steffen
Newbie
Newbie
Posts: 23
Joined: Mon Sep 07, 2009 12:00 am

Sorting crosstab series

Post by Steffen » Mon Nov 16, 2009 12:18 pm

Hi,
when using a crosstab database, the series-indexes usually are not sorted neither by name nor size.

Is there a way to create an orderly looking legend?

Best regards,
Steffen

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Sorting crosstab series

Post by Yeray » Mon Nov 16, 2009 3:52 pm

Hi Steffen,

I can see three options:

- Use ExchangeSeries to reorder your series list so that the legend will be reordered too. The problem here is that probably the order you want the series to be drawn with is not the same than the order you want the series to be listed in the legend.

- Customize your legend with OnGetLegendText and legend symbol OnDraw events. Doing it that way, you'll be able to change the items in the legend one by one. Take a look at the demo at All features\Welcome !\Miscellaneous\Legend\Symbol OnDraw.

- Draw you text and symbols by custom drawing techniques. Here is an example.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply