Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 97
Default Plot value at top of chart

Is it possible to have the highest data point on a line graph plot at the
very top of a chart? For example, if the highest data point is 90 then I
would like highest value of the y axis to also be 90 placing the data point
at the top of the chart instead of excel automatically adding a "cushion
(like 10) to the y axis. The data points vary each time the chart is created
so i can't fix the value at 90.

Thanks,
Joe M.
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 44
Default Plot value at top of chart

Hi Joe,

I was looking at this issue yesterday and came upon this macro. It set the
high of the axis to the highest point of the data and also the low of the
axis to the lowest point of the data. In case you want to start from 0, you
will need to modified the code a bit. Hope this is what you want.

Sub AutoScaleYAxes()
Dim ValuesArray(), SeriesValues As Variant
Dim Ctr As Integer, TotCtr As Integer
With ActiveChart
For Each X In .SeriesCollection
SeriesValues = X.Values
ReDim Preserve ValuesArray(1 To TotCtr + UBound(SeriesValues))
For Ctr = 1 To UBound(SeriesValues)
ValuesArray(Ctr + TotCtr) = SeriesValues(Ctr)
Next
TotCtr = TotCtr + UBound(SeriesValues)
Next
.Axes(xlValue).MinimumScaleIsAuto = True
.Axes(xlValue).MaximumScaleIsAuto = True
.Axes(xlValue).MinimumScale = Application.Min(ValuesArray)
.Axes(xlValue).MaximumScale = Application.Max(ValuesArray)
End With
End Sub



"Joe M." wrote:

Is it possible to have the highest data point on a line graph plot at the
very top of a chart? For example, if the highest data point is 90 then I
would like highest value of the y axis to also be 90 placing the data point
at the top of the chart instead of excel automatically adding a "cushion
(like 10) to the y axis. The data points vary each time the chart is created
so i can't fix the value at 90.

Thanks,
Joe M.

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
Removing Plot lines between plot points on a line chart JDKapono24 Charts and Charting in Excel 2 April 2nd 23 07:07 PM
plots sent to to a chart tab do not show plot & I loss the plot Sim Charts and Charting in Excel 0 September 22nd 09 03:13 PM
dot plot chart+chart wizard Martina Charts and Charting in Excel 6 January 27th 07 12:37 AM
how to plot a polar chart / plot Aparna Charts and Charting in Excel 1 September 30th 06 12:38 PM
Excel chart : I want to plot on the same chart bar and line Diane @ UC Davis Charts and Charting in Excel 1 August 24th 06 02:11 AM


All times are GMT +1. The time now is 01:37 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"