I have a line Chart and want to create a static horizontal/indicator line.
Any suggestions?
Note: I cannot create a new series to plot this horizontal line as I'm using an external data source (OLAP cube) as source data for the chart.
I have a line Chart and want to create a static horizontal/indicator line.
Any suggestions?
Note: I cannot create a new series to plot this horizontal line as I'm using an external data source (OLAP cube) as source data for the chart.
Re: Adding Horizontal Line to chart without creating new Series
How static is static? If the line never changes between data sets then you could use a shape to draw the line.
Or a picture of a line as the plotarea fill.
How exactly are you linking to the data source?
You might be able to use the category axis as the line. Clear the tickmarks and position the labels Low.
Re: Adding Horizontal Line to chart without creating new Series
It's not going to be that static, I shouldn't have used the word static.
The chart will be subject to different data sets, resizing moving etc.
I have percentages on the secondary axis and want to draw a horizontal line at 80%.
Re: Adding Horizontal Line to chart without creating new Series
The attached uses the secondary xaxis to draw the line.
If not can you post an example chart os what you currently have?
Re: Adding Horizontal Line to chart without creating new Series
That's what I'm looking for
Did you just draw a line on the plot area?
I can't believe I didn't think to do that already. Thanks Andy Pope
Re: Adding Horizontal Line to chart without creating new Series
No it is part of the chart. As I said it uses the secondary xaxis to draw the line.
Re: Add Horizontal Line to Chart Without Creating New Series
Sorry, I've had problems with my home network.
I have the secondary xaxis visible but I don't understand how you inserted this line to be part of the chart.
Re: Add Horizontal Line to Chart Without Creating New Series
Double click the secondary y axis. On the scale tab check the value of Cross (X) category Axis, which is set to 0.8 (80%)
This should move the secondary x axis to the 80% mark. You can now double click the secondary x axis and colour it read. Also set tickmark labels and ticks to none.
Re: Add Horizontal Line to Chart Without Creating New Series
Ok it's working now.
Thanks, Much appreciated.
Re: Add Horizontal Line to Chart Without Creating New Series
To create line I am using shape objects. for my requirement I cannot use new series. Following is the piece of code I am using to create the line. When I run the macro in debug mode the line is created at intended location, but if I run in normal mode the line location and size is entirely different.
Set mysheet = Worksheets(ShtNam)
With mysheet.Shapes.AddLine(49.21, 95.83, 342.8, 95.83).Line
.DashStyle = msoLineSolid
.Weight = 1.5
.Style = msoLineSingle
.ForeColor.SchemeColor = 10
End With
Can any one tell me how this issue will be solved.
Re: Add Horizontal Line to Chart Without Creating New Series
Sorry for resurrecting this post.
What if I want to draw another line to the graphic? Or multiple lines? Lets say, one at 80%, another at 50%, another at 40%?
I was able to achieve this only by using a dummy table.
Re: Add Horizontal Line to Chart Without Creating New Series
Excel 2010, Table, PivotTable, PivotChart
With superimposed charts.
http://42aa60af62977a54a0b2-9c…ackcdn.com/10_03_11a.xlsm
If you get *.zip, don't unzip, just rename *.xlsm
Re: Add Horizontal Line to Chart Without Creating New Series
I would like to creat a chart with horizontal lines that represent a range (=interval) and each line starts at a different number in the X-axes. Does anybody know how to do that? Thanks
Don’t have an account yet? Register yourself now and be a part of our community!