+ Reply to Thread
Results 1 to 4 of 4

xy scatter charts

Hybrid View

  1. #1
    TBlack
    Guest

    xy scatter charts


    I have created a scatter chart with a large data set. Instead of seeing
    each label in the chart, I want to be able to hover over a specif point
    and it give me the label pertaining to the point. I am plotting by
    product the volume (x axis) and price (y axis). There are too many
    product codes to have the label show up on the chart.


    --
    TBlack
    Posted from - http://www.officehelp.in


  2. #2
    Jon Peltier
    Guest

    Re: xy scatter charts

    If the chart tip isn't what you want, you can make Excel show a custom
    label, using Tushar Mehta's Chart Hover Label utility, at
    http://tushar-mehta.com

    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Tutorials and Custom Solutions
    http://PeltierTech.com
    _______


    "TBlack" <TBlack.2bu0yp@NoSpamPleaze.com> wrote in message
    news:TBlack.2bu0yp@NoSpamPleaze.com...
    >
    > I have created a scatter chart with a large data set. Instead of seeing
    > each label in the chart, I want to be able to hover over a specif point
    > and it give me the label pertaining to the point. I am plotting by
    > product the volume (x axis) and price (y axis). There are too many
    > product codes to have the label show up on the chart.
    >
    >
    > --
    > TBlack
    > Posted from - http://www.officehelp.in
    >




  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: xy scatter charts

    This may be stale seeing that my response is 6 years later but FYI only I've managed to by pure accident to achieve a very very similar solution to Tusha Mehtar's Hover Label tool.

    First it involves setting the labels using Rob Bovey's very handy (and free ! how crazy is that ?!) XYChartLabeller <http://www.appspro.com/Utilities/ChartLabeler.htm>

    After which you stick this piece of code in the private module of the relevant chart you want this to work on

    Private Sub Chart_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 chart_data As Variant, chart_label As Variant
    Dim last_bar As Long, chrt As Chart
    Dim ser As Series, Txt As String
    
    On Error Resume Next 
    
    Me.GetChartElement x, y, ElementID, Arg1, Arg2
    
    Set chrt = ActiveChart
    Set ser = ActiveChart.SeriesCollection(1)
    chart_data = ser.Values
    chart_label = ser.XValues
    
    If ElementID = xlDataLabel Then
    
    ActiveChart.SeriesCollection(1).Points(Arg2).DataLabel.Font.ColorIndex = 5
    ActiveChart.SeriesCollection(1).Points(Arg2).DataLabel.Font.Size = 10
    ActiveChart.SeriesCollection(1).Points(Arg2).DataLabel.Font.Bold = True
    
    Else
      ActiveChart.SeriesCollection(1).DataLabels.Font.Size = 1
      ActiveChart.SeriesCollection(1).Points(Arg2).DataLabel.Font.ColorIndex = 15
    
    End If
    
    End Sub
    Last edited by arlu1201; 11-25-2012 at 01:35 AM.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: xy scatter charts

    Zer0,

    Welcome to the forum.

    I have added code tags to your post. As per forum rule 3, you need to use them whenever you put any code in your post. Please add them in future. If you need more information on how to use them, check my signature below this post.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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