ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Charts and Charting in Excel (https://www.excelbanter.com/charts-charting-excel/)
-   -   Category Axis placement (https://www.excelbanter.com/charts-charting-excel/29347-category-axis-placement.html)

rvExcelNewTip

Category Axis placement
 

I have a stacked bar chart, with total values of the bars being negative
or positive.

Can I place the Category Axis (X-axis) at the bottom of the chart,
without specifying a specific number?

Now I have put a fixed number on the scale tab for the Value axis (Y)
for "Cuts Category Axis (X) at".

This is rather inconvenient as the minimum values can change from one
run to another.


--
rvExcelNewTip
------------------------------------------------------------------------
rvExcelNewTip's Profile: http://www.excelforum.com/member.php...o&userid=15668
View this thread: http://www.excelforum.com/showthread...hreadid=376715


mangesh_yadav


You could have an activate event macro, something like

Private Sub Chart_Activate()
ActiveChart.Axes(xlValue).ActiveChart.Axes(xlValue ).CrossesAt =
Worksheets("Sheet1").Range("A1")
End Sub


Where Range A1 contains the figure you want the axis to cut through. A1
will have a formula like =MIN(A1:A10)

This is just for you to get an idea.

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=376715


Tushar Mehta

Pick an arbitrarily large negative number (larger than any legitimate
value you will possibly have) for the 'Category (X) axis crosses at'
field.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article ,
says...

I have a stacked bar chart, with total values of the bars being negative
or positive.

Can I place the Category Axis (X-axis) at the bottom of the chart,
without specifying a specific number?

Now I have put a fixed number on the scale tab for the Value axis (Y)
for "Cuts Category Axis (X) at".

This is rather inconvenient as the minimum values can change from one
run to another.


--
rvExcelNewTip
------------------------------------------------------------------------
rvExcelNewTip's Profile:
http://www.excelforum.com/member.php...o&userid=15668
View this thread: http://www.excelforum.com/showthread...hreadid=376715



rvExcelNewTip


The last reply was the "ideal" solution to my problem. As the Y-values
do represent percentages growth or decline and the decline couldn't be
more than 100%, there is an absolute minimum to the scale.

The nice thing about the solution is that if the minimum data value is
e.g. -40%, the Y-scale doesn't extend to -100%.

Thanks.


--
rvExcelNewTip
------------------------------------------------------------------------
rvExcelNewTip's Profile: http://www.excelforum.com/member.php...o&userid=15668
View this thread: http://www.excelforum.com/showthread...hreadid=376715



All times are GMT +1. The time now is 11:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com