Horizontal Stacked Bar Chart

Hi, forum.
I would like to make "horizontal" stacked bar chart.
But following chart looks decidedly wrong.
Is there any way to create it?
String austria = "Austria";
String brazil = "Brazil";
String france = "France";
String italy = "Italy";
String usa = "USA";
NumberAxis xAxis = new NumberAxis();
CategoryAxis yAxis = new CategoryAxis();
StackedBarChart<Number,String> bc = new StackedBarChart<>(xAxis,yAxis);
bc.setTitle("Country Summary");
xAxis.setLabel("Value"); 
xAxis.setTickLabelRotation(90);
yAxis.setLabel("Country"); 
yAxis.setCategories(FXCollections.observableArrayList(austria, brazil, france, italy, usa));
XYChart.Series series1 = new XYChart.Series();
series1.setName("2003");      
series1.getData().add(new XYChart.Data(25601.34, austria));
series1.getData().add(new XYChart.Data(20148.82, brazil));
series1.getData().add(new XYChart.Data(10000, france));
series1.getData().add(new XYChart.Data(35407.15, italy));
series1.getData().add(new XYChart.Data(12000, usa));     
XYChart.Series series2 = new XYChart.Series();
series2.setName("2004");
series2.getData().add(new XYChart.Data(57401.85, austria));
series2.getData().add(new XYChart.Data(41941.19, brazil));
series2.getData().add(new XYChart.Data(45263.37, france));
series2.getData().add(new XYChart.Data(117320.16, italy));
series2.getData().add(new XYChart.Data(14845.27, usa)); 
bc.getData().addAll(series1, series2);
primaryStage.setScene(new Scene(bc, 300, 400));
primaryStage.show();This code is based on JavaFX horizontal bar chart sample code.
http://docs.oracle.com/javafx/2/charts/bar-chart.htm#CIHJFHDE
I can create vertical (standard) Stacked Bar Chart.
Mac OSX
Java7 u4
JavaFX 2.1
Thanks in advance.

Thank you for your answers.
What is the error message, if any, that you are receiving?I have no error message and I can run it.
But displayed chart is this.
[http://postimage.org/image/tvtna1ish/]
except for on one bar the second series stack does not displayIs that the same chart of mine?
I will try looking for it in jira.

Similar Messages

  • Horizontal stacked bar chart supported?

    Hi,
    we have the requirement for a horizontal stacked bar chart. Is this supported in 12.x?
    Just to make shure bevore extending our own Chart Applets.
    Thanks,
    Matthias

    Matthias,
    There are only "Horizontal Bar" and "Horizontal Group Bar" options if you want a horizontal bar chart. The "Stacked Bar" is vertical.
    Regards,
    Kevin

  • Y axis max ignored for horizontal stacked bar chart (SVG)

    G'day,
    I'm using the standard SVG horizontal stacked bar chart (multi-series). I have set the Y axis maximum value but it is ignored - bars are plotted to their maximum height.
    I've had no such problem with vertical stacked bar charts.
    We're running v2.2.0.00.32.
    Is this a known bug?
    Regards,
    Chris.

    I don't understand why you are soying it is not possible.
    Actually I think it is and quite easily but maybe i missunderstand the question.
    But anyway, here is what I would do:
    In the spreadsheet, you can calculate the percentage of each status per project:
         Completed     Pending     Partially completed     Not Started
    Project 1     78.10%     6.46%     10.51%     4.93%
    Project 2     51.01%     2.62%     39.21%     7.15%
    And then select these data for the stacked bar chart. Here you get the graph you are looking for.
    Oli

  • Horizontal Stacked Bar Chart Help!

    I'm looking for a platform independent solution to a horizontal stacked bar chart. I'm interested in seeing solutions in pure CSS3, HTML5 and JavaScript. I have a solution currently coded in ASP.NET MVC4 that I want to add this chart to. I want to be able
    to pass or represent two pieces of information on the chart. For example, a company can only have 20 users. They are currently have 5. I want to show a bar that has 1/4th of the bar in a color, and the other 3/4 in another color. A complete easy
    to use parameterized javascript block would work, but I have been attempting to accomplish this in CSS3... and failing quite miserably! If anyone feels like sharing, I would be greatful! Thanks!

    Hi UOgod619,
    Please post ASP.NET related questions in
    ASP.NET forums where you could get better help.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to format individual series in stacked bar chart

    Hi,
    Is there any way I can format (sort order, or transperency) of each series individually in a horizontal stacked bar chart?
    I am trying to create a gantt chart, where I am using two series
    1. Start Date
    2. Duration
    The function of series one (Start Date) is only to place the start position of the horizontal bar of series 2 (duration) in the year time frame.
    After creation of the stacked bar chart, I want to make the reansperency of series 1 (start Date) as 0 so that the duration bar apears floating and gives the feel of Gantt chart.
    Thanks
    Aurobindo

    You may wish to see the article <a href="http://www.xcelsiusjournal.com/index.php?option=com_content&task=view&id=45&Itemid=2" target="_blank" title="Constructing a Simplified Gantt Chart in Crystal Xcelsius">Constructing a Simplified Gantt Chart in Crystal Xcelsius</a>. It does require changing the skin to Windows Classic, but that&#39;s a small price to pay for having a gantt-like capability.  <p>Loren Abdulezer/Evolving Technologies Corporation<br /><strong><a href="http://www.XcelsiusBestPractices.com">www.XcelsiusBestPractices.com</a></strong><br /><strong><a href="http://www.XcelsiusJournal.com">www.XcelsiusJournal.com</a></strong> </p>

  • Help with stacked bar chart

    Hello,
    I'm looking for help regarding horizontal stacked bar chart. Typically for stacked bars Publisher seems to want data for each stacks per row, but my data looks like this:
    <DATA>
    <ROW>
    <TYPE>Type 1</TYPE>
    <CLASS>A</CLASS>
    <TOTAL>10</TOTAL>
    </ROW>
    <ROW>
    <TYPE>Type 2</TYPE>
    <CLASS>B</CLASS>
    <TOTAL>10</TOTAL>
    </ROW>
    <ROW>
    <TYPE>Type 1</TYPE>
    <CLASS>B</CLASS>
    <TOTAL>20</TOTAL>
    </ROW>
    <ROW>
    <TYPE>Type 2</TYPE>
    <CLASS>A</CLASS>
    <TOTAL>10</TOTAL>
    </ROW>
    <TYPE>Type 3</TYPE>
    <CLASS>A</CLASS>
    <TOTAL>40</TOTAL>
    </ROW>
    </DATA>
    So each bar would be the TYPE element, and each stack within the bar would be the CLASS element.
    Here is a very crude drawing of what I would want the chart to look like: http://i.imgur.com/3gEdEQ5.png
    How can I achieve this? Thanks in advance.

    Jody,
    I'm sorry that I missed that you didn't want an overlay solution. You wrote it plainly, I just didn't read carefully.
    This is as close as I could come to how I now read your request:
    Here I have charted your Actual and a column of zeros that I have called the Goal Reference. The last column contains the goal values and I have used them as Positive Custom Error Bars for the Goal Reference series. I'm not thrilled with the look, but unless I know for sure that I'm on the right track, I'll leave it there for now. The width difference between the goal and the actual can be adjusted.
    Jerry

  • Question regarding 3-D stacked bar chart

    Hi All,
    I'm creating a report that has a view of a horizontal stacked bar chart. I was wondering if there's a way to portray that stacked bar chart as a 100% stacked bar chart like in ms excel?
    Thanks,
    Wayne

    Hi Wayne,
    I'm not sure if I understand your query correctly but I'll have a go at answering your question. I'm guessing that you have a horizontal bar chart that looks something like this, even after you've indicated that you want it to be a stacked chart -:
    |{color:#ff0000}@@@{color}
    |{color:#008000}#########{color}
    |{color:#ff00ff}++{color}
    |{color:#0000ff}===={color}
    However, you want it to look more like this -:
    |{color:#ff0000}@@@{color}{color:#008000}#########{color}{color:#ff00ff}++{color}{color:#0000ff}===={color}
    For the purposes of the example, let's assume you are using two fields for the bar chart - Account Type and *# of Accounts*. By default, your chart options would be set such that Account Type is the value used for the Y axis and *# of Accounts* is the value used for the X axis. Indicating that you want a stacked graph results in the first graph example I listed above. However, if you indicate that Account Type is the value to be used for the measure labels and that there is no value for the Y axis, then a stacked graph will look like the second graph example I listed.
    Hope this helps to answer your question.
    Regards,
    Cameron

  • Horizontal Cluster bar chart

    I am tasked by my PHB to produce a horizontally-stacked bar chart, the horizontal axis is for simple numbers of events, the bars are types of events. It should also have a negative 'reflection' (see drawing below) There is no Z axis. I have successfully generated this as a vertical stacked bar chart (very simple) and I think a simple rotate 90 degrees right would do it, but I can't find one.
    It should look like this, ignoring the dashes:
    ######## ######## Event 1, Value 8
    ----###### ###### Event 2, Value 6, etc
    Any ideas or workarounds welcome!
    Keith Templeman
    EDIT Post to refer to a horizontal cluster bar chart which is what I really want
    Edited by: mansfields on Dec 3, 2008 2:44 PM

    The horizontal equivalent of the vertical stacked bar would be a horizontal stacked bar, which is there on the menu for me to see. As said in my previous post 'what I am after is the horizontal equivalent of the vertical cluster bar'
    To repeat what my requirement is, I have a group of sales people who have five measures each against them, and I can already graph them thus:
    6 5 4 3 3
    but I want to graph them this way, like 90 degrees rotated to the right:
    6 ######
    5 #####
    4 ####
    3 ###
    3 ###
    I think this would be called a horizontal cluster chart, and there is no option on the list that is called that.
    Hope this makes it clearer, and thank you very much for your time and effort so far.
    keith
    EDIT
    From the online books section - "you can only display clustered bar charts in vertical format". That sorts that out then.
    Edited by: user10677133 on Dec 3, 2008 5:16 PM

  • Stacked Bar Chart in Explorer

    BO Explorer 4.1 SP4 (no fix packs)
    I have an issue where I cannot create a stacked bar chart in Explorer. Taking a simple data-set (below screenshot), I wish to have a stacked bar chart that will show this data i.e. one bar per year showing as a %. Is this possible?
    Unfortunately the result I am getting is show below, which obviously isnt correct

    Yes there are ways to get stacked bar chart !
    To get a better idea, just have a look on these threads
    Stacked bar chart to show vertically
    Re: Horizontal stacked bar chart supported?
    Regards
    Ram Upadhyay

  • Stacked bar chart with percentage in Xcelsius

    Hi,
    I want to  create a stacked bar chart(Horizontal) for the following data
    Project 1  --- >    2140, 177,  288, 135
    Project 2  --->     856, 44, 658, 120
    For following status respectively
    Completed,      Pending ,Partially completed,  Not Started
    Project 1 and Project 2 will be on Y axis.
    I want this data to be divided in percentage.
    as shown below
    Project 1 |___135_____|___177_____|______2140_______|
    Project 2 | __44__|___120_____|________856__________|
    0              20           40 ........                          100
    How to achieve this in xcelsius?

    I don't understand why you are soying it is not possible.
    Actually I think it is and quite easily but maybe i missunderstand the question.
    But anyway, here is what I would do:
    In the spreadsheet, you can calculate the percentage of each status per project:
         Completed     Pending     Partially completed     Not Started
    Project 1     78.10%     6.46%     10.51%     4.93%
    Project 2     51.01%     2.62%     39.21%     7.15%
    And then select these data for the stacked bar chart. Here you get the graph you are looking for.
    Oli

  • BAM-Stacked bar chart

    hi,
    how to set Stacked bar chart horizontally instead of vertically(by default).

    Hi HCMJ,
    By default, the bar value will not overlapping each other in stacked bar chart, and we cannot increase or decrease the gap between the series in Reporting Services.
    Based on my research, I find a workaround can achieve your requirement, please refer to the steps below:
    Create a dataset with the query below (sample data):
    CREATE TABLE #temp(name nvarchar(50),time nvarchar(50),value int)
    INSERT INTO #temp VALUES     ('Invoiced','YEAR',100),('Invoiced','MONTH',200),('Budget','MONTH',300),('Budget','YEAR',600)
    SELECT * FROM  #temp
    Insert time field to Category Groups pane, and change the group name to “time”.
    Insert value field to Values pane, then change the value to like below:
    =min(Fields!value.Value,"time")
    Insert another field with the following expression to Values pane:
    =max(Fields!value.Value,"time")
    Change the type of chart from Stacked Bar Chart to Range Bar Chart.
    Right-click the Series field to change the Fill color to #9bff8c00 (DarkOrange with 155 Transparency) or any color with Transparency you like. Now we can get the following:
    Preview it and get the following result:
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Diverging stacked bar chart in Numbers?

    Am looking for instructions on how to create a diverging stacked bar chart in Numbers. I can create this type of chart in Excel, but I want to provide the instructions to someone else who uses Numbers.  For an example, see figure 3 on this page: http://realnumeracy.wordpress.com/2013/12/11/diverging-stacked-bar-charts/  Thank you in advance!

    Create a table where the first row is a header and the first column is a header.
    To make a header select the row(or column) then use the contextual menu to convert to a header:
    similar procedure for a row.
    Enter the data for your chart.
    select columns B and C by clicking the column header for column B, then shift-click the column C.
    Now select the stacked, horizontal bar chart from the charts menu:

  • Help with stacked bar charts

    Help..................
    I am definitely missing something.
    I want to do something like the attached, stacked bar chart example.  This is pretty much
    one of the examples.
    What I need is for a horizontal chart instead of a vertical.  When I right click the legend and
    chose bar charts, it only shows vertical.  After messing with this for a couple of hours,
    I give.
    Any suggestions would be much appreciated.
    Attachments:
    Stacked Bar Graph.vi ‏43 KB

    Another stacked bar graph plea for help!
    My scenario: I am recording 3ph current values (red, yellow, blue) on multiple circuits for some electrical tests we do.
    I want to present this data on a screen that is most visible from a distance, so the approach I have taken when I last wrote the software in Delphi was to have each 3 ph circuit represented by a 3 channel bar chart where the three channels are stacked front to back in order of magnitude. This allowed me to add multiple 3 channel circuits next to these to fill the screen from left to right.
    See attached Excel file to make it clear. I hope!
    The main issue I see is that the colour of plot needs to move front to back with the magnitude. ie Red is not always the front plot, it is the 'smallest' of the three plots that stays at the front.
    Some tests we do, may have 12 x 3ph circuits of this type which fills the screen up and can make it very busy. Rather than having 36 plots left to right, by stacking them in groups of three, I reduce the left to right number to 12 plots. The screen can then be viewed from a distance much easier.
    Any suggestions? I am expecting I will need to write my own routine for this, which if I do, i am quite happy to share when complete.
    See (and run) the attached LabVIEW code of my progress so far.
    thanks  Adam
    Message Edited by tca-adam on 11-16-2006 01:27 PM
    Attachments:
    Stacked Bars example.xls ‏24 KB
    Create CurrBal Graph Data.vi ‏21 KB

  • ADF DVT: Hide certain series of the Horizontal Stacked Bar

    Hello,
    I am trying to achieve a 'waterfall chart' effect by using the <dvt:horizontalBarGraph> of type BAR_HORIZ_STACK. I have really 3 series to show with different colors, but i also provided the 4th series to be the 'offset' value - which tells from which position on Y-axis the first colored bar should be shown. In another word, i created a horizontal stacked bar, with 4 series of data, but i want to hide the bar for 1st series, make it completely transparent.
    I tried to play with <dvt:series> attributes, but can't find 'visible' or 'transparent' or something like that. And i tried to make the background of the first bar to be the same as the chart background - but that won't give good result: First of all, i want to keep the gradient color effect of the bars, but there's no easy way to keep the background to have the same gradient color in the same areat; Second, due to the same reason i can't make a 3D bar to be transparent over a mono-colored background. Third, i want to see the vertical grid lines which connects to the scale values, so even if i make the bar with plain color with no 3D or gradient effect, i will make the background grid lines disconnected.
    Thank you very much for your help!
    Feng

    Achie,
    This is not an issue with the graph as such, but the data issue. Since the value of the data that is being displayed is huge and other datas are relatively very small to occupy the graph area (Ex : 60105 Vs 10).
    You may want to try implementing zoomListener and/or zoomScrollListener for the graph to zoom and see the small datas.
    &amp;lt;dvt:graph&amp;gt;
    -Arun

  • Color code a stacked bar chart?

    Post Author: mmueller12
    CA Forum: Charts and Graphs
    Is there a way to color code a stacked bar chart?  We need to have one horizontal bar with the colors listed below.  In other words, we need to color code a date range to a specific color based on the "Color" column.  I have it to the point of different colors for each date range in a single stacked bar, but cannot figure out how to link to a specific color.
    ID
    StartDate
    EndDate
    Color
    1
    10/18/2007
    11/15/2007
    YELLOW
    1
    05/31/2007
    10/18/2007
    YELLOW
    1
    03/08/2007
    05/31/2007
    YELLOW
    1
    01/25/2007
    03/08/2007
    YELLOW
    1
    06/09/2006
    01/25/2007
    ORANGE
    1
    03/17/2006
    06/09/2006
    RED
    Thanks in advance,Melissa Lord

    Post Author: mmueller12
    CA Forum: Charts and Graphs
    Thanks for the replies - here are the answers to your follow-up questions:
    Lugh - I am using Crystal v10, I don't find a "Color Highlight tab".
    Ranjit - I found this tab, but the only "conditional format" must be based on the start date (x-axis) which is not the field that I need to use to change the color.  It appears that I can only use the x-axis values when conditionally formatting a bar, which is not what I need.  I need to use a field not actually used in the graph to conditionally format the colors.

Maybe you are looking for

  • Can I set a default home page when people use my router?

    Can I set a default home page when people use my router? Can I set it to my web site for example so that people have to go there when they connect? Thanks, Paul

  • JDeveloper IDE simple setting problem

    Hi, Recently we switched to JDeveloper from Visual Cafe .I have a simple setting problem.How can I set the options so that IDE gives, the core java classes and packages,and our application classes and packeges, prompts in imports as well as in code.W

  • Updating a table through a manually created tabular form does not work.

    Hi Friends, I don't know why the "On submit - After computations and validations" process does not update the referenced table. May I miss something. Here is my source : select apex_item.hidden(1,eqp_id) id, apex_item.hidden(2,tcs_tcs_id) tcs, apex_i

  • Adding external HD to network

    I have a Macbook Pro 10.5.8 and a iMac 21.5" 10.6.2 and a LaCie 500gb external HD. My iMac is delivering internet via AirPort to my Macbook since I don't have a wireless router. I want to plug the LaCie into the iMac and have access to it from the Ma

  • Query to determine the no. of objects per object_type for a give

    Hi, Below is the query i m using to determine the no. of objects per object_type for a given owner in DBA_RECYCLEBIN. SELECT count(OBJECT_NAME),TYPE from DBA_RECYCLEBIN groupby TYPE having OWNER='FRPDWSO'; ERROR at line 1: ORA-00933: SQL command not