Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for a Different Chart 2

Status
Not open for further replies.

wec43wec

Technical User
Aug 6, 2005
226
US

I am searching from a chart in Excel or Power Point that appears like a meter (the shape of a half moon) or like a meter in your car, that will allow for a range of numbers to be displaced (0 thru 100) within the "meter/ half moon shape" and will allow me to set a line (needle) that will show a score.

Any ideas or can someone lead me to a Web site with additional charts in Excel or Power Point?

Thanks for any help


Note: I was able to draw such a chart / meter in Excel using "arrows or the format line options", but was unable to paste this drawing into this message. Can someone tell me why I am "unable" to paste drawings, like I am able to paste words?




 
I think you'll need to use VBA to insert and rotate autoshapes.
 
Thanks - but I am sure there is some type of program that will allow a "meter" type chart.

Has anyone else run across such a chart?
 
GlennUK - thanks !

Excellent web sites...................
 
Just for kicks, as a starting point, I've got the following that draws a gauge and rotates the needle:

Code:
Public Function needle(gage As String, dial As Single)
ActiveSheet.Shapes(gage).Rotation = dial
End Function

Public Function DrawGauge(onsheet, gaugename As String, centx, centy, diameter As Integer)
radius = diameter / 2

DialLeft = centx - radius
DialTop = centy - radius
DialWidth = diameter
DialHeight = diameter

PointerWidth = diameter
PointerHeight = diameter / 10
PointerLeft = DialLeft
PointerTop = DialTop + radius - (PointerHeight / 2)

'draw dial and needle
With Worksheets(onsheet).Shapes
    .AddShape(msoShapeOval, DialLeft, DialTop, DialWidth, DialHeight).Name = "Dial" & gaugename
    .AddShape(msoShapeLeftArrow, PointerLeft, PointerTop, PointerWidth, PointerHeight).Name = "Pointer" & gaugename
End With

'draw hashmarks
For Angle = -225 To 45
    rangle = Angle * WorksheetFunction.Pi / 180
    Worksheets(onsheet).Shapes.AddLine centx + (radius * Cos(rangle)), centy + (radius * Sin(rangle)), centx + (radius * 0.8 * Cos(rangle)), centy + (radius * 0.8 * Sin(rangle))
    Angle = Angle + 10
Next Angle

End Function
 
Mintjulep - thanks

This just may be the answer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top