Repositioning datalabels on 3-D stacked-bar chart

I am trying to reposition value datalabels on a 3-D 100%-stacked-bar chart.  I am using Excel 2010.
I am preparing charts for the age distribution and the race/ethnic distribution of new students, among dozens of others.  (Printed, the workbook is over 100 pages, with more charts to be added!)
Each series  (for example, "25 to 29" or "Asian")  has its distinct color.  My boss has stipulated 12pt bold type, but some points are so small that the datalabels are larger than the point.  As a result, he
wants the datalabel filled with the category's color.  He also wants datalabels for points with 0 values displayed  (for instance, "Over 50" or "Not Reported")  inside the bar.
On a 3-D bar chart, the middle of a datalabel is positioned at the vertical middle of the point and at the horizontal middle of the face of the point  (not the middle of the entire point, thus excluding the sidewall).
The 0-valued points are usually at the top or bottom of the bar.  With several categories, inserting the "0" or small-value label at the extreme of the bar often overwrites one or more other labels.  My boss wants the second label moved
below the first, etc.
I have used the eyeball method to adjust the datalabels, but I frequently either overlap another label or allow the contrasting color of the point that the labels overlay to leak through the space between the two labels.
I'm trying to tighten the charts' appearance.  I have written code, for instance, to horizontally align all datalabels for box-and-whisker charts with the label of the mean.  (The labels for the whiskers are not, by default, aligned with the
labels for the box)
The attached code  (in VBA, not VB.Net)
Sub test()
Dim bytPoint As Byte, bytSeries As Byte
Dim strDataLabelName As String
    Dim objDataLabelNext As DataLabel, objPoint As Point
    Const cstrTitle As String = "Position DataLabel"
    If Not TypeName(Selection) = "DataLabel" Then MsgBox "Please select a single DataLabel", , cstrTitle: Exit Sub
    strDataLabelName = Selection.Name
    If Not Left$(strDataLabelName, 4) = "Text" Then MsgBox "DataLabel has an invalid name.  It must be ""Text SnPn"".  Please correct.", , cstrTitle: Exit Sub
    bytSeries = ftbSeries(strDataLabelName)
    bytPoint = ftbPoint(strDataLabelName)
    With ActiveChart
        If bytSeries = .SeriesCollection.Count Then
            Selection.Top = .Axes(xlValue).Top + 0.75
        Else
            Set objDataLabelNext = .SeriesCollection(bytSeries + 1).Points(bytPoint).DataLabel
            Selection.Top = objDataLabelNext.Top + objDataLabelNext.Height
        End If
        Set objPoint = .SeriesCollection(bytSeries).Points(bytPoint)
        Selection.Left = objPoint.Left + (objPoint.Width - Selection.Width) / 2
    End With
    Set objDataLabelNext = Nothing: Set objPoint = Nothing
End Sub
Function ftbPoint(strDataLabelName As String) As Byte
ftbPoint = Val(Mid$(strDataLabelName, InStr(5, strDataLabelName, "P") + 1))
End Function
Function ftbSeries(strDataLabelName As String) As Byte
ftbSeries = Val(Mid$(strDataLabelName, InStr(5, strDataLabelName, "S") + 1))
End Function
...does successfully vertically align the selected datalabel with the label of the next-higher series point, or the bottom of the top axis, if the series is the last.  But the datalabel is horizontally aligned with the entire width of the point, not
the face of the point. 
My strategy is to add half of the excess of the width of the face of the point over the width of the label to the left edge of the point.  objPoint.width returns the 2-D width of the point, not the width of the 3-D face.  I've tried subtracting
the point depth from the point width, but that fails on theoretical, much less practical, grounds.
I'm sure a function or a formula exists to convert the three-space depth to two-space so I can subtract it from the point width, but my little pea-sized brain can't conjure it.  I've invested a day's work with no solution.
Many thanks in advance for your help.

Hi JFHart,
>>The "face" of the point is the front of the object, as opposed to the shaded side.  I'm seeking a way to measure the front.  The .width property seems to include the side; it measures the entire area that is colored<<
Yes, it is correct. The width property of Point include the side. Here the test I did for it:
And as far as I know, Excel object model doesn't provide a way to get the width of front face. I suggest that you submit the feedback from link below if you want to Office support this feature.
Submit Feedback - Microsoft Support
Regards & Fei
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.

Similar Messages

  • 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>

  • 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

  • SVG CHart error ORA-20001 with Stacked Bar Chart HTML DB 1.6.0.00.87

    Hi,
    during I put a How-To into execution (How To Create a Stacked Bar Chart) I'll get the following error code:
    SVG Chart error:ORA-20001:line_Chart error:ORA-20001:
    get_data error:ORA-20001:Parse error:ORA009
    (see http://www.oracle.com/technology/products/database/htmldb/howtos/index.html)
    This Situation occurs when i add a second series to the
    chart. The first series works fine. I've used the following SQL-Statement:
    select null l, sales_month, revenue from (select to_char(o.order_timestamp,'Mon YYYY') sales_month, sum(oi.quantity * oi.unit_price) revenue, to_date(to_char(o.order_timestamp,'Mon YYYY'),'Mon YYYY') sales_month_order from DEMO_PRODUCT_INFO p, DEMO_ORDER_ITEMS oi, DEMO_ORDERS o where o.order_timestamp <= (trunc(sysdate,'MON')-1)and o.order_timestamp > (trunc(sysdate-365,'MON'))and o.order_id = oi.order_id and oi.product_id = p.product_id and p.category = 'Audio' group by to_char(o.order_timestamp,'Mon YYYY') order by sales_month_order);
    Please help.
    Regards
    Detlev

    Well,
    I've just been struggling for a couple of hours with a cluster bar chart giving the same problem.
    The problem is definitely with "ORDER BY".
    I guess the graphing chart is taking the sql query as a string and then does some other manipulation on it which ends abnormally when you include the order by clause.
    I presume that if you embed the query in a
    SELECT * FROM (<actual query with order by>)
    it might mitigate the problem.
    Bye,
    Flavio

  • Stacked Bar Chart with data from a Web Service

    Hi,
    I'm working on Dashboard Design (version 14.0.1.287) and I'm trying to create a chart linked to data from a webservice.
    With a Year in input, my webservice gives an Amount per Cities and Products
    Data retrieved look like this (Sheet1) :
    Paris          Tablets          45
    Paris          Laptops          12
    Paris          Cellulars          89
    New-York     Tablets          56
    New-York     Laptops          36
    New-York     Cellulars          1
    Londres          Tablets          150
    Londres          Laptops          3
    Londres          Cellulars          45
    Then I use a Pivot Table (created manually in Excel) looking like this (Sheet2) :
                   Tablets     Laptops     Cellulars
    Paris          45          12          89
    New-York     56          36          1
    Londres          150          3          45
    The chart is a Stacked Bar Chart plugged on the previous Pivot Table
    I create 3 series (one per Product), values (X) are set with Amount
    Category labels (Y) are set with Cities
    The goal is to have a dynamic chart (series and categories must update if a new city or a new product appears)
    So my question is : how can I set up the chart directly with data retrieved from webservice on Sheet1?
    Thx a lot !
    Nicolas
    Edited by: nicolasheurtevin on Sep 14, 2011 4:58 PM

    hi
    First thing , bad news if you are using .Net framework 1,
    just forget it, Flex 2 doesn't work well with framework 1, but 2nd,
    good news, if you want to use webservices, you'll have to make an
    array of objects on .Net Side and send it as objects to flex, i saw
    an example on the net but i can't seem to remember where, on the
    other hand,if you want to simply use, like i do, HTTPSERVICE its a
    very nice way to talk with .Net and you can see my example here
    http://flex1-for-dummies.blogspot.com
    By the way, in your code, you have a request tag , but you
    aren't requesting anything, because if you were you would have to
    make like this
    <mx:request>
    <Artist>{yourinputtext.text}</Artist>
    </mx:request>
    So if you don't have an input text, you don't need a request
    tag, only the operation.

  • 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

  • Stacked bar chart with negative values

    Hi,
    trying to create a stacked bar chart I only get a grey picture. Reason: my data series provides positive and negative values.
    Can anyone tell me a trick how to fix this problem?

    User614143,
    try to add the minumm negative value (but positive) to the parameter for the axis.
    e.g. show value+3000 (assuming -3000 is the minimum value)
    If you don't have a limitation for the negative values, it doesn't work. (or try to calculate first the most negative value in a before header process)
    hope this helps.
    Leo

  • 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

  • Stacked Bar Chart with Multiple Series Sort Question

    Hi,
    Apex version 4.1.1
    I have a stacked bar chart with three separate series, one showing customer effort, another showing project effort and the third showing other effort, summarized by calendar week. The x-axis of the chart is the calendar "week of" date, and the y-axis has a bar for each of the three series. Not every type of effort occurs every week.
    When AnyChart renders the chart, the order of entries on the x-axis seems to be dependent both on which series are present in a given week as well as the "week of" date. Weeks with all three series sort in order by calendar date, followed by weeks where just the 2nd & 3rd series are present, followed by weeks where just the 3rd series is present. See this [url http://tinypic.com/r/b9zdt/6] picture of the chart  noting the "week of" dates. Note that the months go Sep-Oct-Nov-Aug-Oct.
    Is there a way to force AnyChart to sort the x-axis in chronological order regardless of whether there is data for all three series for a given week? I have looked through the AnyChart XML reference but cannot find a way to do this.
    Incidentally, I can solve the sorting problem by combining all three series into a single query:
    select
      null as link,
      week_of as label,
      sum(customer_effort) as "Customer Effort",
      sum(project_effort) as "Project Effort",
      sum(other_effort) as "Training, Admin and Other Effort"
    from ...But if I do this, I cannot figure out how to have each bar on a given week link to a different detail page, e.g., if I click on a bar representing customer effort I want to link to one page, but if I click on a bar representing project effort, I want to link to a different page. I have had a look at the [url http://apex.oracle.com/pls/apex/f?p=36648:59:1570983160946101::NO:::] chart examples  posted on apex.oracle.com, but cannot figure out how to apply to multiple series in a single query.
    Thanks,
    Mike

    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

  • Problems with stacked bar chart in Java SDK and CRDesigner

    Hi @ll,
    I have an issue with the rendering of stacked bar charts through the Java SDK and the CRDesigner. unfortunately, my research in this forum and with the help of aunt google didn't lead to success.
    These are my problems:
    I have a  stacked bar chart which, when datasets/stacks increase in number per bar, displays errors:
    1.)  the single stacks of the bar merge together randomly and form bigger stacks with the sum of the singles. the information of  single stacks gets lost in the bar.
    2.)  the total sum of all singles is bigger than the maximum value on the y-axis displays. thus, the scaling is wrong.
    1.) appears in the CRDesigner as well as in the Java SDK
    2.) only occurs in the Java SDK
    Is there any trick to turn the random merging of slices off?
    Is the false scaling a known issue and is there a bugfix/workaround?
    many thanks for all advice
    Tom

    hi folks,
    i found the answer to the above problems:
    when you specify the recordfields that are responsible for the change to the next stack or bar, the 'stack' fields have to be unique.
    in my case i evaluated durations in msec (as stacks) from different devices (as bars). randomly i had the same durations for one device. what happens is, that CR does not notice a change and accumulates to the first stack with the same duration.
    surprisingly this also seems to derange the axis scaling. fix the problem by simply using an overall unique recordfield like rownum or a formula that forms the current timestamp to text as identifier for the stacking.
    cheers
    .t

  • 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

  • Problem on stacked bar chart?

    Hi,
    I am trying to create a stacked bar chart. On this chart, Y Axis is the status like new, half finished, finished, X Axis is the value. 3 series: North America, Asia, Europe.
    On the Y Axis, the order of the status from top to bottom should be new, half finished, finished. But North America doesn't have status of new. Asia doesn't have status of half finished. When I run this chart based on the order of the series above. The Y Axis on the chart ends up the order like: half finished, finished, new.
    How can I correct it?
    Thanks for your help.
    Helen

    Can someone help me?

  • Problem with stacked bar chart label

    Hi,
    According to page export sql file I'm using APEX version 2.0.0.00.49.
    I'm trying to make stacked bar chart but no matter what I do I can't have series label to be displayed within the chart area.
    Is it a bug fixed in a latter version of APEX ? Is there something particular to do (for example an option to thick) to have them displayed ?
    thank you for help.

    The answer is yes there is something particular to do.
    If you want your stacked bar chart to display well all series have to be the same and not null.
    So you must write outer joined queries with nvl in the select.

  • Stacked Bar Chart

    Hi I would like to create a stacked bar chart in my report.
    It will have 2 dimensions and 1 Measure.
    Dimension 1 = Month
    Dimension 2 = Sales Item
    Measure = Sales_quantity
    I can't find anything in the user guide.
    Is this possible ?

    I am not sure what you understand as a "stacked bar chart" - There is a chart type "stacked bar chart" that we support. So you can have the Month as the x axis and the Sale Item as the different data sets.
    We are using the Oracle BI Beans XML description for our charts. The BI Beans chart builder helps to define the tags - that is stored in the Web Alternate Text of the Image that is included by the chart builder.
    The tag for the graph type is:
    <Graph graphType="BAR_VERT_STACK"/>
    To show 2 dimensions you need to modify the code the following way
    1) Adjust the row count
    <LocalGridData colCount="{count(xdoxslt:group(.//ROW, 'MONTH'))}" rowCount="{count(xdoxslt:group(.//ROW, 'SALESITEM'))}">
    2) Show the labels
    <RowLabels>
    <xsl:for-each-group select=".//ROW" group-by="SALESITEM">
    <Label><xsl:value-of select="./SALESITEM"/></Label>
    </xsl:for-each-group>
    </RowLabels>
    3) Add multiple rows for the SALESITEM in each column (MONTH) in the data section.
    <DataValues>
    <xsl:for-each-group select=".//ROW" group-by="MONTH">
    <RowData>
    <xsl:for-each-group select="current-group()" group-by="SALESITEM">
    <Cell><xsl:value-of select="sum(current-group()/Sales_quantity)"/></Cell>
    </xsl:for-each-group>
    </RowData>
    </xsl:for-each-group>
    </DataValues>
    The code stehms from an example I did recently for multiple line charts - so I made have some typos in there - from changing hte names. Hope it helps and you get it working.
    We should support the stacked bar charts in the builder, but it is only recently that
    people cared about the charts...
    Good luck,
    Klaus

Maybe you are looking for

  • Report for Depreciated Stock

    Hello, Do we have any report which will have the details of Depreciated stock. Do we have any report just like MC.1 but add a information with the value depreciate for all the component of stock. Regards, Lavanya

  • New to Powershell - Please Help

    In short - I believe Powershell can achieve what is needed but I'm not sure how to compile the script.  I have roughly 2k directories including multiple levels of subdirectories. I would like to achieve the following: 1. Identify all directories with

  • Wifi sync not working on itunes 10.6.3.25 after updating

    Hello I would like some help please have just update itunes to 10.6.3.25 on my windows 7 64bit system and i am now having problems with the wifi sync in itunes i have avg  2012 internet security and have allowed the ports access in the firewall but h

  • How do I create an executable for a computer that does not have IVI drivers

    I'm creating an executable driver (based on the NI drivers) for a TDS 3054 intended for a computer that does not have the IVI engine. I would prefer to install as little software on this computer as possible. Is it possible for me to build the driver

  • Safari 5.1.2 crashes after installed Mac OS X 10.6.8 Update Combo v1.1

    Process:         Safari [946] Path:            /Applications/Safari.app/Contents/MacOS/Safari Identifier:      com.apple.Safari Version:         5.0.5 (6533.21.1) Build Info:      WebBrowser-75345207~2 Code Type:       X86-64 (Native) Parent Process: