Excel line graph with *thick* lines

  • Thread starter Thread starter eibon
  • Start date Start date
E

eibon

Does anyone know how to customise the line width within an Excel line
graph more than the standard options.

I need a chart with a very thick line for a presentation, but can't
seem to be able to create one..

Many thanks


O.
 
Right-click on the series you want to change and choose Format Data Series.
In the Patterns tab, choose Custom line style and change the Weight option.

HTH, Greg
 
My problem is that the thickest line available using that method stil
isn't very thick..

Is there any way of inputting the line thickness in points?

Thanks

O
 
No, you can't enter a value in points, not even with VBA. You might consider
making a drawing object that overlies your data.

HTH, Greg
 
Hi eibon,

You can only use the built-in thicknesses.

If you really need to fatten the line further then add extra data
series. Use values that are slightly offset from the original ones.
Then format these additional lines as the original.

Cheers
Andy
 
Here's a macro that draws a thick line connecting the points in series 1
of the active chart.


''' START THE CODE ---------------------------------------
Sub DrawALine()
Dim myCht As Chart
Dim mySrs As Series
Dim Npts As Integer, Ipts As Integer
Dim myBuilder As FreeformBuilder
Dim myShape As Shape
Dim Xnode As Double, Ynode As Double
Dim Xmin As Double, Xmax As Double
Dim Ymin As Double, Ymax As Double
Dim Xleft As Double, Ytop As Double
Dim Xwidth As Double, Yheight As Double

Set myCht = ActiveChart
Xleft = myCht.PlotArea.InsideLeft
Xwidth = myCht.PlotArea.InsideWidth
Ytop = myCht.PlotArea.InsideTop
Yheight = myCht.PlotArea.InsideHeight
Xmin = myCht.Axes(1).MinimumScale
Xmax = myCht.Axes(1).MaximumScale
Ymin = myCht.Axes(2).MinimumScale
Ymax = myCht.Axes(2).MaximumScale

Set mySrs = myCht.SeriesCollection(1)
Npts = mySrs.Points.Count

Xnode = Xleft + mySrs.XValues(1) * Xwidth / (Xmax - Xmin)
Ynode = Ytop + (Ymax - mySrs.Values(1)) * Yheight / (Ymax - Ymin)

Set myBuilder = myCht.Shapes.BuildFreeform(msoEditingAuto, Xnode, Ynode)
For Ipts = 2 To Npts
Xnode = Xleft + mySrs.XValues(Ipts) * Xwidth / (Xmax - Xmin)
Ynode = Ytop + (Ymax - mySrs.Values(Ipts)) * Yheight / (Ymax - Ymin)
myBuilder.AddNodes msoSegmentLine, msoEditingAuto, Xnode, Ynode
Next
Set myShape = myBuilder.ConvertToShape

With myShape
' USE YOUR FAVORITE COLOR HERE
.Line.ForeColor.SchemeColor = 12 ' BLUE
.Line.Weight = 6#
End With

End Sub
''' END THE CODE -----------------------------------------


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______



Greg said:
No, you can't enter a value in points, not even with VBA. You might consider
making a drawing object that overlies your data.

HTH, Greg
 
Back
Top