+ Reply to Thread
Results 1 to 9 of 9

Pop-up box for names in Scatter Chart

  1. #1
    Registered User
    Join Date
    01-10-2018
    Location
    Norfolk, UK
    MS-Off Ver
    13
    Posts
    3

    Pop-up box for names in Scatter Chart

    Hi All,

    I am trying to get my Scatter Chart to have a pop up box appear when I hover on the point on my Scatter Chart. I want the chart to show the name, KS1 and KS2 Pred data for each point. Is there a VBA code that will let me do this please?

    For ease I have uploaded a sample file. Sheet 1 contains the data that has been plotted and the chart the final plot. The orange lines have been manually added to the chart and are to show a national data set average so can be ignored.

    Also, is it possible to have the points a different shape or colour according to the gender please?

    Many thanks in anticipation.

    Regards

    Tancho
    Attached Files Attached Files
    Last edited by Tancho; 01-11-2018 at 04:38 AM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Pop-up box for names in Scatter Chart

    I had to pull this out of the archives both from the sample workbooks (it's from an *.xls workbook - pre 2007) and from my mind.

    I does not display on hover. You have to click the point. I could not find an "on hover" event.

    Here is what I did:

    I put some named dynamic ranges on your data on sheet 1 so you can add to this table and the chart will catch it, although an Excel Table would have been easier.

    You stated that you wanted different markers for male and female - if you want different markers, make different series. I've done this in the helper columns F:I, These columns are overlaid with dynamic ranges too for the purposes of plotting.

    I went to the chart and plotted the male series and the female series.

    Then on the sheet containing the chart, I inserted my old code and modified it.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    01-10-2018
    Location
    Norfolk, UK
    MS-Off Ver
    13
    Posts
    3

    Re: Pop-up box for names in Scatter Chart

    That works perfectly! Thank you for your quick response and help.
    Much appreciated.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Pop-up box for names in Scatter Chart

    @dflak, you can use the mousemove event. Although using a messagebox means you have to be careful not to move over points you are not interested in.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    01-10-2018
    Location
    Norfolk, UK
    MS-Off Ver
    13
    Posts
    3

    Re: Pop-up box for names in Scatter Chart

    Possibly a daft question but where I have the orange lines (national averages) is there a way to get this automatically? At the moment if a plot is on the line it won't open the box as it selects the line. I know this is because I have put these in by hand but wondered if there was a way to get these so that I can still select points.

    Apologies for another question but thank you in anticipation for your time again.
    Last edited by Tancho; 01-11-2018 at 07:19 AM.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Pop-up box for names in Scatter Chart

    Why not create another series, line with no markers, to draw though lines as part of the chart?

  7. #7
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Pop-up box for names in Scatter Chart

    Amdy: I see a MouseMove, MouseDown and MouseUp event. I do not see a MouseOver.

    Tancho. Andy's suggestion is probably the solution. However, move the new series up or down in the data so they are "under" the points you want to select.

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,431

    Re: Pop-up box for names in Scatter Chart

    There is not a mouseOVER event. You would use the same code but place it in the mousemove event. Obviously the event is firing a lot more often than the mousedown.

    Another option to the mousedown event is the selected event.

  9. #9
    Registered User
    Join Date
    03-15-2018
    Location
    England
    MS-Off Ver
    2016
    Posts
    2

    Re: Pop-up box for names in Scatter Chart

    Hi, I have similar scatter chart with MouseUp event, however when I filter on chart (example female only) the message box does not display.
    Would you please be able to help? Eva

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Quick scatter chart with multiple series names
    By icupat in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-10-2015, 02:21 PM
  2. Replies: 1
    Last Post: 07-17-2014, 11:04 AM
  3. Replies: 2
    Last Post: 02-13-2014, 06:18 AM
  4. [SOLVED] Wrap category names (Y axis labels) of a scatter chart?
    By JayUSA in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-17-2012, 06:39 AM
  5. [SOLVED] Exclude one data series from scatter chart legend (but not from the chart)
    By JayUSA in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-29-2012, 05:24 PM
  6. I'd like names on a scatter chart
    By mimi in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 02-09-2007, 03:17 PM
  7. Add names to scatter plot chart
    By oberon.black in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-29-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1