Automating good data labels on stacked area pivot

HalpClueless

New Member
Joined
Mar 18, 2015
Messages
2
I have a stacked area showing resource use across time. Each resource is categorized by:

Chemical ChemA, ChemB, ChemC etc. (values change by month)
Cost cheap/expensive (does not change by month per chemical)
Region AUS/EU/NA (does not change by month per chemical)

I slice/pivot the data so the viewer can elect to see only cheap chemicals, or only AUS chemicals, or only cheap AUS chemicals etc. as desired.

Example data and pivots below (I hope?):

ChemicalPriceRegionJan-15Feb-15Mar-15Apr-15May-15Jun-15Jul-15Aug-15Sep-15Oct-15Nov-15Dec-15
ChemACheapNA20405055523830150000
ChemBCheapNA000204050555238301515
ChemCCheapEU10202537.5464442.533.519157.57.5
ChemDExpensiveEU000204050301501500
ChemFExpensiveEU10202537.54644555238523830
ChemGExpensiveAUS004442.533.519154455445552
ChemHExpensiveAUS1515503015001915191533.5
ChemIExpensiveAUS7.57.5445552383000191533.5

<colgroup><col width="83" span="15" style="width:62pt"> </colgroup><tbody>
</tbody>


image _zpsctdocyga.jpg


image _zpsb249uzsu.jpg


Anyway, I want to label the areas representing each chemical, so viewers can easily see which are which. I can add data labels one-by-one by selecting add data labels -> format data labels -> uncheck "Value" and check "Series Name". However, these labels all appear in the middle of the chart (over June 2015)...some series may be flat (0) at that month so the labels look awkward and are all bunched up, especially for a large number of different chemicals.

If I try to move the labels, Excel 2013 adds leader lines to where the axes cross - and they get re-added whenever I change the pivot filters.

Is there a better way to do this?

Thanks!

HalpClueless
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Hi Halp

I would recommend creating a style for your chart and saving that style. You can then select the style each time easily or even program a button or event to change the style when you need it to.
Therefore you can always let the chart look the way you want it to.

Let me know if this helps or if I misunderstood you.
Regards
R
 
Upvote 0
Hi Halp

I would recommend creating a style for your chart and saving that style. You can then select the style each time easily or even program a button or event to change the style when you need it to.
Therefore you can always let the chart look the way you want it to.

Let me know if this helps or if I misunderstood you.
Regards
R

Thanks for your reply Wessie! The data labels seem to be positioning themselves fine, though by default they appear in the middle of the chart (center of the timescale, with time on the x-axis), so I have to horizontally re-position them so they occupy some space covered by the area to which they pertain. Whenever I redefine the pivot parameters, Excel will remember my horizontal re-position (as well as recalculate what the vertical position should be) and it will move the label appropriately to be in the correct series. However, whenever it does this it adds leader lines, which get automatically re-added anytime I change the pivot filters. Chart styles do not seem to have any effect on leader lines, and deleting them one-at-a-time every time I change a pivot filter is not practical...

As a workaround: Does anyone know any way to make leader lines transparent/invisible by default?
 
Upvote 0
  1. Click a chart that has data labels displayed.
    This displays the Chart Tools, adding the Design, Layout, and Format tabs.
  2. On the Layout tab, in the Labels group, click Data Labels.
    b3de2c92-61c7-42f7-895b-a878ccacb846.gif

  3. Click More Data Label Options.
  4. In the Label Options category, under Label Contains, select or clear the Show Leader Lines check box to show or hide the leader lines.

    In programming:
    Code:
        ActiveSheet.ChartObjects("Chart 1").Activate
        ActiveChart.SeriesCollection(1).DataLabels.Select
        ActiveChart.SeriesCollection(1).HasLeaderLines = False

    Hope this helps.
    Regards
    R
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,699
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top