Solved

Excel scatter graph data labels

Posted on 2014-10-27
11
121 Views
Last Modified: 2014-11-13
I have produced a scatter graph using a macro set up spreadsheet I found on the internet. The problem I have is it labels each point and I have over 200 hundred points so all the names lie on top of each other. I was hoping there would be a way to hover over and then the name appears?
0
Comment
Question by:katewillwin
11 Comments
 
LVL 27

Expert Comment

by:Glenn Ray
ID: 40407366
It's probably just a matter of removing the argument/statement that includes the data labels.

If you'll post the code, I'm sure we can help locate and resolve this.

-Glenn
0
 
LVL 6

Expert Comment

by:Brian Matis
ID: 40407374
Not quite sure what labels you're referring to. Axis labels? Labels on the points themselves? In either case, try clicking on one of the labels and hitting the delete key.
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
ID: 40407497
@ KATE

you have two options.

A)  i have attached an example code in a chart object.  see attached file.


B)  you can use the  add-in developed by Tushar Meta  Add-in Called  Chart hover label.  it exactly does what you have described.  
you can download add-in from the link below.  i believe the add-in is for free
http://www.tushar-mehta.com/excel/software/chart_hover_label/
EE.xlsb
0
 

Author Comment

by:katewillwin
ID: 40408047
Thanks for the responses.  The macro I downloaded creates the names but as there are so many plots the names lie on top of each other.  I can not get the names to only show when you hover over them.  If you hover over them it only shows the coordinates.

I have attached to hopefully male it clearer.
example-chart.xlsx
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 25

Accepted Solution

by:
ProfessorJimJam earned 500 total points
ID: 40408184
Kate,

can you check this attachment?
example-chart.xlsm
0
 

Author Comment

by:katewillwin
ID: 40412763
That's amazing, how did you do that?
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
ID: 40412836
I just wrote the below into the chart object vba   and it does the magic :-)


Private Sub Chart_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)
Dim ElementID As Long
Dim Arg1 As Long
Dim Arg2 As Long


Me.GetChartElement x, y, ElementID, Arg1, Arg2
If ElementID = 3 Then
    ActiveChart.SeriesCollection(Arg1).Points(Arg2).ApplyDataLabels
    ActiveChart.SeriesCollection(Arg1).Points(Arg2).DataLabel.Font.Size = 14
    Z = 0
    For N = 11 To Sheets("Sheet1").Cells(Sheets("Sheet1").Rows.Count, 5).End(xlUp).Row
        If Sheets("Sheet1").Cells(N, 1).Height > 0 Then
            Z = Z + 1
            If Z = Arg2 Then Exit For
        End If
    Next N
    ActiveChart.SeriesCollection(Arg1).Points(Arg2).DataLabel.Text = Sheets("Sheet1").Cells(N, 5)
Else
    On Error Resume Next
    ActiveChart.SeriesCollection(1).DataLabels.Delete
    On Error GoTo 0
End If
End Sub

Open in new window

0
 
LVL 25

Expert Comment

by:ProfessorJimJam
ID: 40423396
katewillwin

i have provided the solution to your question.  please close the question by accepting ID: 40408184
0
 
LVL 25

Expert Comment

by:ProfessorJimJam
ID: 40432185
this question is answered and the answer was accepted by author (see text ID: http:#a40412763) .  however, the author has forgotten to close the question accepting it.  

I recommend closing the question by accepting the ID: http:#a40408184.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now