Scatter Chart

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am attempting to create a scatter chart utilizing the following data: Number of Products, % of Sales, and Employee Name. I want each point on the graph to be the intersection of Number of Products and % of Sales for each employee (easy to do). However, when I hover over points of the graph with my mouse, I want the data label to show the Employee Name appropriate for each point. Please help!
 
Thanks for the info, Jon! However, when I use the Tushar Mehta add-in, the screen does some weird blinking things and the other options are nice but, as you pointed out, they show up all the time. I have about 160 points on the chart I am creating, and many of them have the same values so they are very close together. I need a way to make the chart look clean, but still have the option to view the information as to who is associated with each point.
 
Megan -

I don't think you can improve on these two options. I once wrote a
utility like Tushar's, and it worked pretty well, except for this
blinking annoyance.

If you are using an embedded chart, and want to put information into the
nearby cells, the following works without much flicker. It puts
information into the worksheet about the last point the mouse went over,
while ignoring any of the other chart elements. The chart has to be
selected, and you have to have set up a chart events class module first.

Private Sub EmbChart_MouseMove _
(ByVal Button As Long, ByVal Shift As Long, _
ByVal X As Long, ByVal Y As Long)

Dim ElementID As Long, Arg1 As Long, Arg2 As Long
Dim myX As Double, myY As Double

With EmbChart
.GetChartElement X, Y, ElementID, Arg1, Arg2

If ElementID = xlSeries Or ElementID = xlDataLabel Then
If Arg2 > 0 Then
myX = WorksheetFunction.Index _
(.SeriesCollection(Arg1).XValues, Arg2)
myY = WorksheetFunction.Index _
(.SeriesCollection(Arg1).Values, Arg2)
ActiveSheet.Range("J2:J6") = WorksheetFunction _
.Transpose(Array("Series " & Arg1, _
"""" & .SeriesCollection(Arg1).Name & """", _
"Point " & Arg2, _
"X = " & myX, _
"Y = " & myY))
End If
End If
End With
End Sub

- Jon
 
Megan,

I'm in the same boat, and had the same problems with the
hover chart add-in. After long searching through the
knowledgebase, I found this article:

http://support.microsoft.com/default.aspx?scid=kb;en-
us;213750

It says we are out of luck. Fortunately, I know some
Java, so if I have to do some programming, I'll use Open
Office and save my boss thousands of dollars and save
myself thousands of hours. It's disgraceful that
Microsoft charges premium prices for a product that can't
perform basic functions.
-----Original Message-----
I am attempting to create a scatter chart utilizing the
following data: Number of Products, % of Sales, and
Employee Name. I want each point on the graph to be the
intersection of Number of Products and % of Sales for each
employee (easy to do). However, when I hover over points
of the graph with my mouse, I want the data label to show
the Employee Name appropriate for each point. Please help!
 
To both the OP and to anonymous:

You can use the XY Chartlabeler from www.appspro.com to statically
label each series points with the contents of any worksheet range.
Alternatively, for a pseudo-dynamic display, you can use the far from
perfect Excel | Add-Ins | 'Hover Chart Label' available from my site.

--
Regards,

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