The community of Analytics developers are invited to follow and participate in the developer network.
OpenText technical experts collaborate with supported customers and partners in the Magellan product area.

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.

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?
    Regards,
    Jeff F.
    Sr. Technical Support Specialist
    OpenText
  • edited May 15
    Hi Jeff,

    Thanks for the reply!

    1. I am using 4.6.0:
    Business Intelligence and Reporting Tools 
    
    Version: 4.6.0.v201606072122 
    
    Build id: v20160607-2112

    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.
  • edited May 15
    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:
    1. 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. 
    2. 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.
    3. Create a chart and select "Stacked Bar" or "Percentage Stacked Bar" for the chart type.
    4. On the Select Data tab, set the X-axis to the groupBy computed column.
    5. Add a Y-axis series for each of the other computed columns (countries).
    6. On the Format Chart tab, select "Series" and provide a name for each series.
    Let me know if you have any questions.
    Regards,
    Jeff F.
    Sr. Technical Support Specialist
    OpenText
  • Works perfectly, thanks for the help!
Sign In or Register to comment.