BIRT Exchange Forum: X-axis data value sorting on stacked bar chart graph not fully working - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

X-axis data value sorting on stacked bar chart graph not fully working Rate Topic: -----

#1 User is offline   AlbertYu Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 40
  • Joined: 23-May 11


Posted 03 April 2012 - 09:08 PM

Hello,

I am using BIRT version 2.5.0 coupled with Troux version 9.0. Due to the coupling I am therefore unable to upgrade to the latest version of BIRT.

I have a report with a data set that is ordered by Column D, in a descending fashion. I wish to display Column A's contents in the order ordered by Column D.
Example: SELECT name, city, pc_count, visit_count FROM tableA ORDER BY DESC visit_count
Data set returns the information as expected ordered by visit_count.

I have linked this data set to a stacked bar chart.

The x-axis of the bar chart displays Column A's (name) contents. As mentioned before, I wish this ordered in the order set by Column D (visit_count) of the data set.

The y-axis of the bar chart displays Column B's (city) contents.

And the optional Y series grouping is linked to Column C's (pc_count) contents.

My colleague and I was attemping to sort the x-axis information according to the sort order of the data set, as ordered by Column D of the data set.

We couldn't achieve this result, but in the process, we discovered the following:

1. If I remove the optional Y series grouping, the GUI then allows us to set the sort order for the X Series to the field wanted (visit_count), then the x-axis is properly sorted the way we want. But obviously the chart doesn't show the optional Y series grouping, which we want as well.

2. Adding the optional Y Grouping back in, greys out the ability to set the sort order for the X Series, and the X Series reverts back to be sorted by Column A (name).
The Help screen indicates that if no sort order is selected then the fields would be displayed in the order returned by the query. This unfortunately does not seem to be the case if the Optional Y grouping is selected.

Neither 1 or 2 is exactly what my colleague and I want.

Is there a way to have the graph sorted in the way we want and also have the optional Y series grouping in place as well?

Is ths a known bug? Is it fixed in a later verison of BIRT?


Thank you,

Albert
0

#2 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 05 April 2012 - 11:38 AM

Can you create a report using the sample database that shows what you're doing and describe what you want? I'll take a look.
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#3 User is offline   AlbertYu Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 40
  • Joined: 23-May 11


Posted 09 April 2012 - 05:17 PM

View Postmwilliams, on 06 April 2012 - 06:38 AM, said:

Can you create a report using the sample database that shows what you're doing and describe what you want? I'll take a look.



Hi Michael,

Please see the 2 picture attachments.

Please note the filenames on both files too. They have useful descriptions on them that describe what the bar chart currently is like.

Basically, what my team and I want is "sorted and has optional Y series in the bar graph".

Is this possible?


Thanks,

Albert

Attached File(s)


0

#4 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 10 April 2012 - 10:06 AM

I was going to suggest that you could maybe use a grouped table as a source to try to get around this, but in 2.5.0, it doesn't seem to work correctly using optional grouping with a table as the source. You might try computing the totals for each x axis category and adding a computed column that adds a sort order to the front of the field value, so that you can just use the ascending or descending. There might be more options if you were able to upgrade, but I'm not sure. I can try to make an example, if you'd like. Let me know.
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#5 User is offline   AlbertYu Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 40
  • Joined: 23-May 11


Posted 10 April 2012 - 03:08 PM

View Postmwilliams, on 11 April 2012 - 05:06 AM, said:

I was going to suggest that you could maybe use a grouped table as a source to try to get around this, but in 2.5.0, it doesn't seem to work correctly using optional grouping with a table as the source. You might try computing the totals for each x axis category and adding a computed column that adds a sort order to the front of the field value, so that you can just use the ascending or descending. There might be more options if you were able to upgrade, but I'm not sure. I can try to make an example, if you'd like. Let me know.


Michael,

I find it easier to understand with an example, as most people do I believe.

Could you please make an example?

Thanks.
0

#6 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 09 May 2012 - 08:12 AM

Sorry for the delay. Here's a way to do it. You can probably make this better, but this will get you a starting point. Upgrading might make this a little bit easier, too, whenever you can. I have not looked at this exact issue in the newest version, yet, though. Let me know if you have questions.

Attached File(s)


Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#7 User is offline   AlbertYu Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 40
  • Joined: 23-May 11


Posted 14 May 2012 - 05:19 PM

View Postmwilliams, on 10 May 2012 - 03:12 AM, said:

Sorry for the delay. Here's a way to do it. You can probably make this better, but this will get you a starting point. Upgrading might make this a little bit easier, too, whenever you can. I have not looked at this exact issue in the newest version, yet, though. Let me know if you have questions.



Thanks for this Michael. I am getting 90% of it at the moment.

I just need to learn what the script does.

Can you please point me to a good BIRT scripting API documentation? I have the following, but it doesn't help much:

http://help.eclipse....ntInstance.html

Thanks again.

Albert
0

#8 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 17 May 2012 - 07:17 AM

That's probably going to be your best overall resource. Other than that, devShares, blogs, and forum posts showing how to do specific things are going to be the big helper. What specific questions do you have? I'll try to explain. :)
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users