ClusteredColumnChart (bar) not picking order from datasource

Stimulsoft Reports.WPF discussion
Post Reply
sandynith
Posts: 64
Joined: Thu Dec 12, 2013 4:03 am

ClusteredColumnChart (bar) not picking order from datasource

Post by sandynith »

Hi, I am trying to plot a Clustered Column chart (Bar chart) and I notice that the bars are not appearing in the same order as specified in data source, rather bar series always appear in alphabetic order.

As shown in the attached picture, the days are not appearing in correct order (as specified in data source which is Monday, Tuesday, Wed, Thursday etc) rather they appear in alphabetic order.
Bars always appearing in alphabetic order - While I want them to appear in the order as specified in data source
Bars always appearing in alphabetic order - While I want them to appear in the order as specified in data source
Bar order issue.JPG (38.45 KiB) Viewed 2693 times
Please find attached report template and data file for you to see the issue.
Stimulsoft version: 2014.1.1900 (WPF)

All I want is bars should appear in the same order as specified in my data source because alphabetic order may not make sense all the time.
Please let me know your thoughts.

Thanks,
Sandeep
Attachments
BarOrderIssue_data.csv
Sample data - notice that the days are in order Monday, Tuesday, Wednesday etc
(547 Bytes) Downloaded 238 times
BarOrderIssue_Report.mrt
Report - in Bar chart the days series appear in Alphabetic order rather than as specified in data source
(13.03 KiB) Downloaded 310 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: ClusteredColumnChart (bar) not picking order from dataso

Post by Alex K. »

Hello,

The report rendering correct. Your column DataSource1.Day is string type and order as string value. In your case please try to add the number value for the days (additional column or in the current column as prefix).

Thank you.
sandynith
Posts: 64
Joined: Thu Dec 12, 2013 4:03 am

Re: ClusteredColumnChart (bar) not picking order from dataso

Post by sandynith »

Hi Aleksey,
Thanks for your suggestion, I think that's a good point and will work.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: ClusteredColumnChart (bar) not picking order from dataso

Post by Andrew »

Hello,

Please let us know about the results of implementing our suggestion.

Have a nice day!
sandynith
Posts: 64
Joined: Thu Dec 12, 2013 4:03 am

Re: ClusteredColumnChart (bar) not picking order from dataso

Post by sandynith »

Hi Andrew,

The suggestion worked well for me. Now I have another colomn say 'SeriesOrder' which is numeric and defines the order I want say 1,2,3,4..
Now with this arrangement:
ValueDataColumn - defines values Plotted on Y axis
ArgumentDataColumn - defines values plotted on X axis
AutoSeriesKeyDataColumn - defines series (it is the SeriesOrder column so they are in desired order)
AutoSeriesTitleDataColumn - defines series title (each value in SeriesOrder has its corresponding title)
AutoSeriesColorDataColumn - defines the color for each series (each value in SeriesOrder has its corresponding color)

This arrangement works well for the Line or Bar graphs so far.
Thanks for your help !!
Sandeep
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: ClusteredColumnChart (bar) not picking order from dataso

Post by Alex K. »

Hello,

Great!
Let us know if you need any additional help.

Thank you.
Post Reply