Chart (stacked bars) - corresponding legend

hi everyone,
i've got the following situation: I'm creating an vertical stacked bar chart (type:BAR_VERT_STACK) with the following code:
<DataValues>
<xsl:for-each-group select=".//ROW[COUNTRY!='']" group-by="COUNTRY">
<xsl:sort select="COUNTRY" order="DESCENDING"/>
<xsl:variable name="my_country" select="COUNTRY"/>
<RowData>
<xsl:for-each-group select="../ROW[MONTH!='']" group-by="MONTH">
<xsl:variable name="my_month" select="MONTH"/>
<Cell><xsl:value-of select="../ROW[COUNTRY=$my_country] [MONTH=$my_month]/AMOUNT"/></Cell> </xsl:for-each-group>
</RowData>
</xsl:for-each-group>
</DataValues>
and the legend:
<RowLabels>
<xsl:for-each-group select=".//ROW" group-by="COUNTRY">
<xsl:sort select="COUNTRY"/>
<Label><xsl:value-of select="current-group()/COUNTRY"/></Label>
</xsl:for-each-group>
</RowLabels>
everything works fine, but my problem is, that the created stacks are not in the same order as my legend .... so, if my first stack for example shows US, then the last item of the legend should show US as well.
does anyone know how to create this behaviour?
thanks

Mike,
thanks - I am aware of the stacked barcharts - the question is, if this type is available in a clustered manner as well ?
I so far cud only see either "stacked barcharts" or "clustered barcharts" - but not "clustered , stacked barcharts" which wud be series of stacked barcharts ...
TIA
Bernhard

Similar Messages

  • Chart "Stacked bars" - clustered available ?

    Hi,
    as anymore developed a chart with stacked bars, which are clustered ?
    Development team: when will/might we have this available in APEX?
    TIA
    Bernhard

    Mike,
    thanks - I am aware of the stacked barcharts - the question is, if this type is available in a clustered manner as well ?
    I so far cud only see either "stacked barcharts" or "clustered barcharts" - but not "clustered , stacked barcharts" which wud be series of stacked barcharts ...
    TIA
    Bernhard

  • Numbers Charts:  Stacked bar chart with two sets of data

    Hi....newbie with first post
    I'm trying to create a stacked bar chart with two lots of comparative data.
    So, there is Basic + Overtime for April 2010 as one stack (ie the basic is one colour, stacked on top is the overtime in a different colour)
                      Basic + Overtime for April 2011 next to it.
    I can get April figures next to one another as four separate columns (2 x basic, 2 x overtime), or I can get all four figures in a single stack, but I can't to two columns (one for each year) of basic and overtime.
    Any ideas?

    UK,
    What you are trying to do will require that you interleave the two sets of two-series data into one longer two-set series, and then plot just the one pair of series. Clear as mud?
    What I'm saying is that you have to fake out the program into thinking that you have just two sets, not four.
    You will have one series that has, for instance Apr 2010 Basic, Apr 2011 Basic, May, 2010 Basic, May 2011 Basic, etc.. This other series in that chart will have Apr 2010 Overtime, Apr 2011 Overtime, May 2010 Overtime, May 2011 Overtime, etc.
    The bad thing here (I'll anticipate your first complaint) is that 2010 and 2011 data will have the same color for Basic and another color will be assigned for both 2010 Overtime and 2011 Overtime.
    To get separate color sets for 2010 and 2011 data pairs, you will have to create two charts and overlay them. Both charts would be built in the alternating year format described above, but in one chart all the 2010 data would be blank and in the other chart all the 2011 data would be blank, leaving spaces in the chart for the data from the other chart to nest in.
    Jerry

  • Stacked Bar Chart - Hiding legends with 0 values

    I'm using Crystal Reports 2008, building a report that will eventaully be called from an ASP.NET page.
    I've built a stacked bar chart that is displaying values per month of the number of various vehicle types.  The X values are the months, the Y values are the number of each vehicle type and the stacked series are each different vehicle type.  However, depending on the months that the user asks for, there may be some vehicle types that do not have any data, thus the number is 0.  Is there a way for the report to see that there is 0 data for this vehicle type and thus not include it in the legend of the various vehicle types?
    First time poster, so hopefully I explained everything well enough.  I searched the forums for anything matching Stacked Bar Chart and did not find anything.  I don't know how to find/query SAPNotes.
    Thanks.

    Thanks for the response, but I'm not familar with Alters?  Could you describe a bit more?  I didn't see anything in the documentation about it.

  • Is there any way to link the individual rows of data to the corresponding bars in a bar chart so that each legend title appears simultaneously with its corresponding bar when creating a build? I can do it in a pie chart but can't in a bar chart.

    Is there any way to link the individual rows of data to the corresponding bars in a bar chart so that each legend title appears simultaneously with its corresponding bar when creating a build? I can do it in a pie chart but can't in a bar chart.

    You used the data.  Verizon can not see what it was sued for.  However your phone can see whats apps used the data.  go to settings-data usage- there will be a place that says data usage cycle.  line the dates up with your cycle.  then there will be a bar graph below that   extend bother white bars one all the way to the left and one all the way to the right.  after those are extended below that will be a list of apps,  there should be one that used over 2 gb and that will show you what app used that data in her purse

  • Formatting the legend of a stacked bar chart

    Hi,
    Is it possible to change/edit the legend part of a stacked bar chart right now I am getting the legend as"
    [Color Code1]                   Sum of [TableName].Column Name1
    [Color Code2]                   Sum of [Table Name].Column Name2
    [Color Code3]                   Sum of [Table Name].Column Name3
    etc...
    and I would like this to be displayed as
    [Color Code1]                   Column Name1
    [Color Code2]                   Column Name2
    [Color Code3]                   Column Name3
    Thanks,
    ii xi
    Edited by: ii.xii on Jan 9, 2012 4:47 PM

    Well, the only way to edit that is to select the Legend entry (In Preview Mode Only) > Right-click > Edit Axis Label.
    You would need to do this for every Legend entry.
    -Abhilash

  • Problem with Stacked Bar Chart

    I have a problem with a stacked bar chart in Numbers 09. My chart is a single series with 6 categories. All of the categories have different values. The first 5 categories display correctly. However, the last category does not display in the color its supposed to, but rather shows up as white/background instead of the grey color shown on the legend. However, the value label is displayed in the proper place.
    When I select other chart types (pie, regular bar, or regular column) the category shows up like it's supposed to.
    This is kind of annoying since I would rather use stacked bar instead of a pie chart. Is there an upper limit on the number of values it can display as a stacked bar chart? Is this just a bug? Thanks!

    Here's my result with six values in a single series. I double clicked the last bar to change its colour from the default grey (which was visible) to magenta.
    Numbers 2.0.3, iBook G4, OS X v10.4.11
    (Shot in the dark:) Try double clicking the value label, then changing the order position of this item.
    Regards,
    Barry

  • Stacked bar chart with single group

    Post Author: rt50896
    CA Forum: Charts and Graphs
    Dear all,   I have a question about stacked bar chart with one group value(normally more than one group value is ok)   ex. YYYYMM      PRODUCT    AMT        -
            200601          ABC            1000        200602          ABC              300        200603          ABC              500       .....   the data collection is as above,then chart display: x-axis as YYYYMM,y-axis as PRODUCT...   but why this case the bar chart color not the same for each YYYYMM? and legend not display one PRODUCT as ABC only?   the bar chart display like this:   http://tkfiles.storage.live.com/y1po30C7CH6eW9phoLAXH89MBGwFLYdEZ3kOMQXUQzDzwM-VNnffibEwqPI8TIUNBm1f7uKTjnkaOI   ps. crystal report version is 8.5Regina

    Thanks, Jeff. I did try this but for whatever reason it doesn't make a difference. I think it is because if there's no data for a given series for a certain week, there is no entry in the data set that is sent to AnyChart.
    I was able to get around the issue by "filling in" the missing weeks from each data series. To generate the list of "Week Of" dates for a given date range, I used this code:
    select
         trunc (each_day) as week_of,
         0 as effort
    from (
         select
              (to_date(:p920_start_date,:app_date_format) + 2 - to_char(to_date(:p920_start_date,:app_date_format),'D') - 1) + level each_day
         from dual
         connect by level <= to_date(:p920_end_date,:app_date_format) - to_date(:p920_start_date,:app_date_format) + 1
    where
         to_char (each_day, 'D') = '2'This creates an effort entry of 0 for each week within the date range; I use the Monday date of a week as the "Week Of" date. I then union this with my actual data and summarize by week and viola, I get the weeks in order. This also has the benefit of showing a week for which there are no entries in any of the three series.
    Thanks for taking a look at this.
    Mike

  • CR XI Issue with Stacked Bar Chart

    I'm hoping this question is easy.
    I'm having trouble creating a stacked bar chart.
    I want to do a Bar Chart which will show one "Bar" for each Priority (Priority 1, 2, 3, 4 or 5) and then for each Priority divide out, by color, the Status (Submitted, Reviewing, Working, Testing....).
    For example, let's say that there are 10 Priority 1 records. Of those 10, 5 have a Status of Submitted, 3 are being Reviewed and 2 are being Tested. Then the Priority 1 bar should show a count of 10 which is comprised of 3 colors which will correspond to the 3 Statuses that make up the 10 Priority 1 records.
    I can't get the Stacked Bar Chart to display this correctly.
    In the Chart Expert, the Data Tab says:
      -- On change of: Priority - Ascending
      -- Show Value(s): Count of Status
    When I run the CR, it get's the Priority correct and I see the total for each Priority. But it does not then take each Bar and color code by Status.
    Any ideas how to get it to do that?
    Thanks,

    Hi,
    You should have in On change of field a sub group as well.
    For stacked bar charts it is necessary to have a group and a sub group fields in on change of section.
    Say you have the month.
    no of priority1 in jan etc.
    Hope that helps!!
    Thanks
    -Azhar
    Edited by: Azhar on Aug 4, 2009 8:23 AM

  • Vertical Stacked Bar Chart

    I have created Vertical Stacked Bar Chart and would like to put some space between value and value title for Y axis
    Thanks

    I believe you are going to have to edit the XML, scroll to the bottom of the Chart Attributes page and select Yes for "Use Custom XML", then you will have to change the chart area x/y/width/height. (you can do the same for the legend as well)

  • Jfreecharts- stacked bar chart query

    Hi all,
    I am using JfreeCharts for building an application which reports the usage metrics of two servers over a period of time.
    Each server does a number of operations which can be broadly grouped under 6 heads and these broad divisions are being used for reporting.
    When I use Stacked bar chart for creating the bar graph image, the order in which the bars get displayed is wierd. The dates start from 25th Feb to 28th Feb. Hence I am expecting the bars for the data from the dates 25th... 26th...27th and 28th; but the bars that come up are the 25th ... 26th... 28th and the 27th... Is there a group utility which can be used to order the grouping??? I am posting my code used for grouping the data.
    map = new KeyToGroupMap("G1");
    renderer = new GroupedStackedBarRenderer();
    for (int i = 0; i < (metricsList2[0].size()); i++)
    map.mapKeyToGroup(((XxccrCropsdbColourgrp)(metricsList2[0]).get(i)).getAttributeName1(), ((XxccrCropsdbColourgrp) (metricsList2[0]).get(i)).getAttributeName2());
    renderer.setSeriesToGroupMap(map);
    From the database the groups being sent are G1,G2,G3 and G4 which correspond to the 4 dates mentioned above.
    Help will be highly appreciated....
    Madhu

    The actual problem is when I am adding data to the map for the grouping , the data is getting jumbled up... The groups which are added to the map are not added in order.

  • 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

  • Sort legend area in stacked bar graph

    Hi!
    Is it possible to sort the legend area in a stacked bar graph?
    Br
    Casper

    In the chart data editor, click and drag one of the the rows to change the ordering:

  • Multiple Categories on a Stacked Bar Chart - Is it Possible?

    I'm using Crystal 2008 reports designer to convert charts now being maintained in MS Access.
    Is it possible to have multiple categories on a stacked bar Crystal Chart  as you can in MS Chart (used in Excel and Access)?
    I need to put both a date category and a community category on the x-axis, a numeric count on the y-axis and use a legend to differentiate the stack segments in the bar. So far I can only get either community or date on the x-axis and need to have both.

    I'm using Crystal 2008 reports designer to convert charts now being maintained in MS Access.
    Is it possible to have multiple categories on a stacked bar Crystal Chart  as you can in MS Chart (used in Excel and Access)?
    I need to put both a date category and a community category on the x-axis, a numeric count on the y-axis and use a legend to differentiate the stack segments in the bar. So far I can only get either community or date on the x-axis and need to have both.

  • Is Stacked Bar/Column chart Supports Multiseries..?

    Hi All
    Is Stacked Bar/Column chart Supports Multiseries..?
    I was trying to build a Stacked Bar chart .And add a line
    series to it But when i run this I'm getting an error
    like this
    "ReferenceError: Error #1056: Cannot create property offset
    on mx.charts.series.LineSeries."
    Here is My Code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.collections.ArrayCollection;
    [Bindable]
    public var netPrByQtrData:ArrayCollection=new
    ArrayCollection
    {quarter:"Q4 05", bottom:88.89, middle:11.11, top:0.00,
    netPromoter:-88.89},
    {quarter:"Q1 06", bottom:80.00, middle:10.00, top:10.00,
    netPromoter:-70.00},
    {quarter:"Q2 06", bottom:16.67, middle:50.00, top:33.33,
    netPromoter:16.67},
    {quarter:"Q3 06", bottom:28.57, middle:28.57, top:42.86,
    netPromoter:14.29},
    {quarter:"Q4 06", bottom:80.00, middle:20.00, top:0.00,
    netPromoter:-80.00},
    {quarter:"Q1 07", bottom:80.00, middle:0.00, top:20.00,
    netPromoter:-60.00},
    {quarter:"Q2 07", bottom:60.00, middle:20.00, top:20.00,
    netPromoter:-40.00},
    {quarter:"Q3 07", bottom:80.00, middle:0.00, top:20.00,
    netPromoter:-60.00}
    ]]>
    </mx:Script>
    <mx:Panel title="Net Promoter By Quarters" width="500"
    height="350" x="31" y="34">
    <mx:ColumnChart id="mychart"
    dataProvider="{netPrByQtrData}"
    showDataTips="true"
    height="250"
    width="450" type="stacked">
    <mx:horizontalAxis>
    <mx:CategoryAxis categoryField="quarter"/>
    </mx:horizontalAxis>
    <mx:series>
    <mx:ColumnSeries
    yField="bottom"
    xField="quarter"
    displayName="Bottom" >
    </mx:ColumnSeries>
    <mx:ColumnSeries
    yField="middle"
    xField="quarter"
    displayName="Middle" >
    </mx:ColumnSeries>
    <mx:ColumnSeries
    yField="top"
    xField="quarter"
    displayName="Top" >
    </mx:ColumnSeries>
    <mx:LineSeries
    yField="netPromoter"
    xField="quarter"
    displayName="Net Promoter" >
    </mx:LineSeries>
    </mx:series>
    </mx:ColumnChart>
    <mx:Legend dataProvider="{mychart}"
    direction="horizontal"/>
    </mx:Panel>
    </mx:Application>
    If I omit type="stacked" from
    <mx:ColumnChart id="mychart"
    dataProvider="{netPrByQtrData}"
    showDataTips="true"
    height="250"
    width="450" type="stacked">
    The code will work perfectly..But unfortunately its not a
    Stacked Chart...
    Is there any solution for this....Please reply your valuable
    suggestions ASAP.....
    Thanks in Advance..
    Subin

    Hello,
    In Flex Builder 4 and Above.
    For composite charts with Multiple column series and line series,
    Remove type = “stacked” property from Column Chart.
    and Add columnset like.
    <mx:series>
        <mx:ColumnSet type="stacked">
           <mx:ColumnSeries yField="aSales" displayName="A Sales" />
           <mx:ColumnSeries yField="bSales" displayName="B Sales" />
        </mx:ColumnSet>
        <mx:LineSeries yField="total" displayName="Total Sales"/>
    </mx:series>
    Cheers,
    SaM.

Maybe you are looking for