Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 1
Default Macro to change position of chart labels on line chart

Hello all,

I have quite a trickly problem to solve and I would appreciate any
suggestions.

I have a dashboard page in a worksheet which shows financial KPIs
(i.e. sales) as forecast this year versus last year. There are a
number of line charts on the dashboard showing the differing
forecasts; the user of the dashboard can choose a business unit to
view.

What I would like to be able to do is to have the chart labels for
these charts automatically change their aligmnent so that they display
properly. I have set the chart labels to display "Above" for the new
forecast and "Below" for the previous forecast, but in cases where the
forecast has been revised downards the labels do not display properly.

So the macro would need to:
- check if the business unit selected has changed
- check each each point on each chart (there are two series) and for
each pair of values for each year, set the alignment of the chart
label to "Above" for the higher value and "Below" for the lower value

Any suggestions about how to write this macro (or whether it's even
possible) or other solutions would be really gratefully appreciated!

Thanks in advance,
Shane
  #2   Report Post  
Posted to microsoft.public.excel.charting
Xt Xt is offline
external usenet poster
 
Posts: 49
Default Macro to change position of chart labels on line chart

On May 26, 6:31*pm, Shane Henderson
wrote:
Hello all,

I have quite a trickly problem to solve and I would appreciate any
suggestions.

I have a dashboard page in a worksheet which shows financial KPIs
(i.e. sales) as forecast this year versus last year. *There are a
number of line charts on the dashboard showing the differing
forecasts; the user of the dashboard can choose a business unit to
view.

What I would like to be able to do is to have the chart labels for
these charts automatically change their aligmnent so that they display
properly. *I have set the chart labels to display "Above" for the new
forecast and "Below" for the previous forecast, but in cases where the
forecast has been revised downards the labels do not display properly.

So the macro would need to:
- check if the business unit selected has changed
- check each each point on each chart (there are two series) and for
each pair of values for each year, set the alignment of the chart
label to "Above" for the higher value and "Below" for the lower value

Any suggestions about how to write this macro (or whether it's even
possible) or other solutions would be really gratefully appreciated!

Thanks in advance,
Shane


How about a dummy series for each graph series which is a suitable
amount above or below its matching series as calulated from the data.
So if series A is above series B at a particular point, the dummy
series A has say 10 added on to A and dummy series B has 10 taken off
B. And vice versa. Now put the labels onto the dummy points (I am
assuming that you are using ChartLabeller) and shift them using
Labeller so that they are sitting on top of the dummies. The dummies,
of course have no markers.

xt
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
labels in line chart GrandMufti Charts and Charting in Excel 1 April 28th 08 10:55 PM
Excel 2003 Line Chart - Switch Axis Position sot Charts and Charting in Excel 2 September 27th 07 01:12 PM
League position change trend chart, how? JS25 Excel Discussion (Misc queries) 1 March 18th 07 04:38 PM
how can i change position of x and y axis in chart? zare-jamal Charts and Charting in Excel 2 October 27th 05 01:35 PM
auto position of data labels in a line chart Nick Turner Charts and Charting in Excel 2 October 18th 05 11:43 PM


All times are GMT +1. The time now is 07:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"