How to create bar chart out of pie chart? (one bar, split by x axis entries)
I have the following info:
___
| |
| | ___
| | | | ___
| | | | | |
===========================================
#1 #2 #3
I want to display it in a single bar chart like the following:
----
| |
| |
| | #1
| |
----
| | #2
| |
----
| | #3
----
Preferably horizontally.
Essentially, I want to create a "pie chart" out of my data and display it in bar form instead of circular form. One bar, broken down into the individual entries in the x axis. The individual blocks representing each x axis entry has a length that corresponds to its y axis value.
It's exactly like this: https://www.youtube.com/watch?v=C-oT1zIKTbg but for BIRT instead of excel.
___
| |
| | ___
| | | | ___
| | | | | |
===========================================
#1 #2 #3
I want to display it in a single bar chart like the following:
----
| |
| |
| | #1
| |
----
| | #2
| |
----
| | #3
----
Preferably horizontally.
Essentially, I want to create a "pie chart" out of my data and display it in bar form instead of circular form. One bar, broken down into the individual entries in the x axis. The individual blocks representing each x axis entry has a length that corresponds to its y axis value.
It's exactly like this: https://www.youtube.com/watch?v=C-oT1zIKTbg but for BIRT instead of excel.
0
Comments
-
Hi Bryan,I have a few questions:1. What version of BIRT are you running?2. What is the Output Format of the chart (i.e. SVG, HTML5, etc.)?3. Are the bars (ignoring height) constant? For example, if you are charting the number of people in a country, the number of people will obviously change, but are the countries always the same?Warning No formatter is installed for the format ipb0
-
Hi Jeff,
Thanks for the reply!
1. I am using 4.6.0:<div>Business Intelligence and Reporting Tools </div><div>Version: 4.6.0.v201606072122 </div><div>Build id: v20160607-2112</div>
2. I don't usually touch the Output Format setting so it's in SVG, the default format. I don't see HTML5 in my Output Format options (I only have PNG, JPG, BMP, SVG)
3. Yes, the number of x axis entries and their names will be exactly the same all the time, e.g. it's always Country A, Country B, and Country C.0 -
Hi Bryan,HTML5 is the default format for charts in the OpenText commercial designer. It isn't an option in the Open Source designer which is why you don't see it.I have attached an example. Here are the steps I took to create the single stack chart:
- Create a computed column in the data set for each of the categories. My query returns 4 countries, so I added 4 computed columns, one for each country. The column expression is standard JavaScript. It sets the value to 0 unless the category and category data values match.
- Add a groupBy column in the data set that sets the same string for every row. It will be used to create the single stacked bar. The data value you choose will appear as the X-axis label on the chart.
- Create a chart and select "Stacked Bar" or "Percentage Stacked Bar" for the chart type.
- On the Select Data tab, set the X-axis to the groupBy computed column.
- Add a Y-axis series for each of the other computed columns (countries).
- On the Format Chart tab, select "Series" and provide a name for each series.
Warning No formatter is installed for the format ipb1 - Create a computed column in the data set for each of the categories. My query returns 4 countries, so I added 4 computed columns, one for each country. The column expression is standard JavaScript. It sets the value to 0 unless the category and category data values match.
-
Works perfectly, thanks for the help!0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management