Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to set the x-axis order(Having trouble understanding why the x-axis order is out of order)
How to set the x-axis order [message #748837] Mon, 24 October 2011 23:12 Go to next message
Kevin Williams is currently offline Kevin WilliamsFriend
Messages: 5
Registered: October 2011
Junior Member
Hello,

Hoping someone can help me out. I want to do a simple line graph which shows the number of cases by month by priority (each priority is it's own line).

I have a simple data set, where I've ordered everything correctly. It is ordered by year, month, priority, and everything displays correctly in sql. The query is:

select count(issueID), year, timeDimension.monthDscShort, month, priority
from issue inner join TimeDimension on (Issue.createdDateTDID=TimeDimension.timeDimensionID) where year>=(EXTRACT(YEAR FROM NOW())-1) group by year, monthDscShort, month, priority order by year asc, month asc, priority asc;

I test the display and order in a table, all is fine. I then go to a line graph. I put the count on the y axis, and the year + month on the x-axis. I then put the priority in the "Optional Y series Grouping" The data displays, but the ordering is all off and is not displaying numerically. I'm guessing the grouping is somehow screwing this up. Can anyone give me any pointers or points me to documentation I can read to help me figure this out?

I played around with the SortKey in the definition, but it didn't help at all. I have attached a screenshot of my design, the output, and the file itself.

[Updated on: Mon, 24 October 2011 23:12]

Report message to a moderator

Re: How to set the x-axis order [message #750068 is a reply to message #748837] Tue, 25 October 2011 16:01 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Have you tried removing the optional grouping and click the group sort
icon on the x-axis and make it group on priority?

Jason

On 10/24/2011 7:12 PM, Kevin Williams wrote:
> Hello,
>
> Hoping someone can help me out. I want to do a simple line graph which shows the number of cases by month by priority (each priority is it's own line).
>
> I have a simple data set, where I've ordered everything correctly. It is ordered by year, month, priority, and everything displays correctly in sql. The query is:
>
> select count(issueID), year, timeDimension.monthDscShort, month, priority
> from issue inner join TimeDimension on (Issue.createdDateTDID=TimeDimension.timeDimensionID) where year>=(EXTRACT(YEAR FROM NOW())-1) group by year, monthDscShort, month, priority order by year asc, month asc, priority asc;
>
> I test the display and order in a table, all is fine. I then go to a line graph. I put the count on the y axis, and the year + month on the x-axis. I then put the priority in the "Optional Y series Grouping" The data displays, but the ordering is all off and is not displaying numerically. I'm guessing the grouping is somehow screwing this up. Can anyone give me any pointers or points me to documentation I can read to help me figure this out?
>
> I played around with the SortKey in the definition, but it didn't help at all. I have attached a screenshot of my design, the output, and the file itself.
Re: How to set the x-axis order [message #752919 is a reply to message #750068] Wed, 26 October 2011 15:12 Go to previous messageGo to next message
Kevin Williams is currently offline Kevin WilliamsFriend
Messages: 5
Registered: October 2011
Junior Member
Jason,

Thank you for the quick response! Any chance you can send me a screen shot of the group sort icon? I'm sorry, but for the life of me, I don't see it (I'm sure it's staring me straight in the face!).

Also, I'm apparently misunderstanding the optional grouping field--I there any documentation you can point me to on what it does (teach me to fish)?

[Updated on: Wed, 26 October 2011 15:12]

Report message to a moderator

Re: How to set the x-axis order [message #753348 is a reply to message #752919] Wed, 26 October 2011 19:22 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

See attached screen shot:

To understand how the optional grouping works look at the attached
example. I put some print lines on two charts that write out to a file.
You will need to change the location. In that example my data comes
in like:


sourcedata[0][0] = 10;
sourcedata[0][1] = "Chris Kwai";
sourcedata[0][2] = 232;

sourcedata[1][0] = 10;
sourcedata[1][1] = "Ice Bella";
sourcedata[1][2] = 291;

sourcedata[2][0] = 10;
sourcedata[2][1] = "Nola Dicci";
sourcedata[2][2] = 567;

sourcedata[3][0] = 11;
sourcedata[3][1] = "Chris Kwai";
sourcedata[3][2] = 312;

sourcedata[4][0] = 11;
sourcedata[4][1] = "Ice Bella";
sourcedata[4][2] = 614;

sourcedata[5][0] = 11;
sourcedata[5][1] = "Nola Dicci";
sourcedata[5][2] = 212;

So for 3 users I have 10 and 11 value. If I do not optionally group my
chart (But I group sum on x-axis) gets two sets of data one for the
category and one for the summed values for each user.

Series Data <undefined>
Chris Kwai
Ice Bella
Nola Dicci
Series Data <undefined>
544.0
905.0
779.0

If I use optional grouping I get three sets of data. One for the
category and then one for each optional group (ie 10 and 11):

Series Data <undefined>
Chris Kwai
Ice Bella
Nola Dicci
Series Data for month 10
232.0
291.0
567.0
Series Data for month 11
312.0
614.0
212.0

This will then draw two bars (10 and 11) for each user.

Does this make sense?

Jason

On 10/26/2011 11:12 AM, Kevin Williams wrote:
> Jason,
>
> Thank you for the quick response! Any chance you can send me a screen
> shot of the group sort icon? I'm sorry, but I for the life of me, I
> don't see it (I'm sure it's staring me straight in the face!).
>
> Also, I'm apparently misunderstanding the optional grouping field--I
> there any documentation you can point me to on what it does (teach me to
> fish)?
Re: How to set the x-axis order [message #754312 is a reply to message #753348] Wed, 02 November 2011 03:06 Go to previous messageGo to next message
Kevin Williams is currently offline Kevin WilliamsFriend
Messages: 5
Registered: October 2011
Junior Member
Jason,

Thanks for the example! It helps a lot. Grouping on the x axis sums up items by a category, if not summed, which I don't need as I've already summarized the data in SQL.

Going back to the sorting, when I have the optional y series grouping selected, the "sort on" sorting option field is grayed out, and forced to be the display name. Can you explain why I can't set the sort order when I use the optional y series Grouping?


Re: How to set the x-axis order [message #754606 is a reply to message #754312] Thu, 03 November 2011 13:29 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

It should be sorting on the category value. Within each group you can
sort using the sort icon next to the optional grouping field on the
second tab of the chart wizard.

Jason

On 11/1/2011 11:06 PM, Kevin Williams wrote:
> Jason,
>
> Thanks for the example! It helps a lot. Grouping on the x axis sums up
> items by a category, if not summed, which I don't need as I've already
> summarized the data in SQL.
>
> Going back to the sorting, when I have the optional y series grouping
> selected, the "sort on" sorting option field is grayed out, and forced
> to be the display name. Can you explain why I can't set the sort order
> when I use the optional y series Grouping?
>
>
>
Previous Topic:Export Data shows multiple rows in CSV
Next Topic:Font of Series Identifier
Goto Forum:
  


Current Time: Thu Apr 25 13:59:49 GMT 2024

Powered by FUDForum. Page generated in 0.03543 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top