Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Stacked Bar-Chart: Category (X) Series Sorting
riyaz_itls
Hi,
I am trying to develop a 'Stacked Bar Chart' as in the attachment (uses a csv datasource)
The chart has:
- float values set as 'Value (Y) Series'
- string value hour_of_day (eg:1pm) set as 'Category (X) Series'
- string values for 'Optional Y Series Grouping'
the dataset is already sorted by hour_of_day. but adding the 'Optional Y Series Grouping' seems to collapse the default sort.
in short I want the X axis sorted (Starting from 12am and ending at 11pm). this sorting happens by default if i remove the 'Y series grouping'
can you help me achieve this sorting with 'Y series grouping' included
Thanks
Find more posts tagged with
Comments
cypherdj
On the "Select Data" step when you create the chart, you set your row["HOUR"] in the category data, but you can also set sorting and grouping there.
The following article has a section on the x-axis sorting/grouping:
http://publib.boulder.ibm.com/infocenter/rmc/v7r5m0/index.jsp?topic=/org.eclipse.birt.doc/birt/birt-15-3.html
I hope this helps,
Cedric
riyaz_itls
<blockquote class='ipsBlockquote' data-author="'cypherdj'" data-cid="83038" data-time="1316524488" data-date="20 September 2011 - 06:14 AM"><p>
On the "Select Data" step when you create the chart, you set your row["HOUR"] in the category data, but you can also set sorting and grouping there.<br />
<br />
The following article has a section on the x-axis sorting/grouping:<br />
<br />
<a class='bbc_url' href='
http://publib.boulder.ibm.com/infocenter/rmc/v7r5m0/index.jsp?topic=/org.eclipse.birt.doc/birt/birt-15-3.html'>http://publib.boulder.ibm.com/infocenter/rmc/v7r5m0/index.jsp?topic=/org.eclipse.birt.doc/birt/birt-15-3.html</a><br
/>
<br />
I hope this helps,<br />
Cedric<br /></p></blockquote>
<br />
Hi Cedric,<br />
<br />
Thanks for your response.<br />
<br />
Without even specifying a sorting explicitly the x-axis was sorted (as per the dataset resultset order) if the 'Optional Y Series Grouping' is not specified. I am trying to understand why the Y Series Grouping collapses the default resultset order.<br />
<br />
Since my x-axis row["HOUR_12"] returns strings (12am, 1am, 2am etc) I am not sure how to sort the same.
cypherdj
Could you reproduce the problem with the sample database and send the report design?
riyaz_itls
<blockquote class='ipsBlockquote' data-author="'cypherdj'" data-cid="83191" data-time="1316731317" data-date="22 September 2011 - 03:41 PM"><p>
Could you reproduce the problem with the sample database and send the report design?<br /></p></blockquote>
<br />
Hi Cedric,<br />
<br />
The 'StackedBarChart.zip' attached as part of my first post reproduces the problem. The zip has the report design and the csv file. To run the report the following (CSV DataSource Home) has to be changed in the report design.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<property name="HOME">F:\workspace\eclipse\helloX\helloBIRTBarChart</property>
</pre>
<br />
Additionally I'll try to reproduce the same with sample database and post the design soon.<br />
<br />
Thanks<br />
Riyaz
cypherdj
oh ok, I missed the previous attachment, I'll have a look when I get home in a few hours.
Cedric