OWC Category Label Sorting

A

Andi

Hi

I have an OWC Chart displaying my data well but there I have some
problems with the ordering of the x axis categories. My Chart is using
databound data from an MS Acess XP database by the way.

My chart displays data over a 4 week period where each category is a
week (i.e. 4 categories altogether). I have the categry labels set as
the following (these are UK dates by the way - dd/mm/yyyy):

25/04/2005 - 01/05/2005
02/05/2005 - 08/05/2005
09/05/2005 - 15/05/2005
16/05/2005 - 22/05/2005

I want my chart to display the data in this order. However the data gets
display in the following order:

02/05/2005 - 08/05/2005
09/05/2005 - 15/05/2005
16/05/2005 - 22/05/2005
25/04/2005 - 01/05/2005

It seems the OWC Chart is using the first 2 digits of the first date to
sort on i.e. 02, 09, 16, 25.

You can see my chart at the following address:

http://homepages.nildram.co.uk/~brompton/chart1.gif

Is there anyway to stop this happening?

Is there anyway to tell the OWC Chart to display the data in the order
it receives it from the database?

Any help or ideas on how I can get around this would be very much
appreciated.

Thanks

Andi
 
A

Alvin Bruney [MVP - ASP.NET]

Data is displayed in the chart according to the order it appears when the
series collection object is initialized. One approach is to use the index
property to re-arrange the collection. Another approach is to simple load
the data in a specific order. The black book discusses this in great detail,
but in a nutshell the code should look like this


objchart.seriescollection[1].Index = 7 will re-order the first item causing
it to appear in position 6
roughly

--
Regards,
Alvin Bruney - ASP.NET MVP

[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
Now available @ www.lulu.com/owc, Amazon.com etc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top