![changing the hover data of scatter chart in excel changing the hover data of scatter chart in excel](http://i.stack.imgur.com/dyLJ4.jpg)
- #CHANGING THE HOVER DATA OF SCATTER CHART IN EXCEL HOW TO#
- #CHANGING THE HOVER DATA OF SCATTER CHART IN EXCEL CODE#
ReDim clsChartEvents(1 To )įor Each chtObj In ActiveSheet.ChartObjects ' Works for embedded charts on a worksheet or chart sheet ' Enable events for all charts embedded on a sheet If TypeName(ActiveSheet) = "Chart" Then Set clsChartEvent.EventChart = ActiveSheet ' Enable events for active sheet if sheet is a chart sheet = cx(Arg2) & "," & chart_data(Arg2)ĭim clsAppEvent As New CAppEvent, clsChartEvent As New CChartEvent Set ser = EventChart.SeriesCollection(Arg1) Set txtbox = (1, x, y, 40, 30)ĮventChart.GetChartElement x, y, ElementID, Arg1, Arg2 Private Sub eventChart_MouseDown(ByVal Button As Long, ByVal Shift&, ByVal x&, ByVal y&)ĭim ElementID&, Arg1&, Arg2 As Long, chart_data, txtbox As Shape, ser As Series, cx
#CHANGING THE HOVER DATA OF SCATTER CHART IN EXCEL HOW TO#
Ser.Points(Arg2).Interior.ColorIndex = 44Īnd it bring up a text box for each point on the graph I just don't know how to get the text in the boxes can anyone help? I guess its something to do with the named range section that I'm not doing right? Set txtbox = ActiveSheet.Shapes("hover") 'I suspect in the error statement is needed for this. Set ser = ActiveChart.SeriesCollection(1) Me.GetChartElement x, y, ElementID, Arg1, Arg2 On Error Resume Next 'Sorry for this line of code, I haven't had the chance to look into why it was needed. Private Sub Chart_MouseDown(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long)ĭim ElementID As Long, Arg1 As Long, Arg2 As Longĭim chart_data As Variant, chart_label As Variant I have a Scatter graph with a lot of points on it and I want to clean it up my making the data labels only appear when they are clicked on or hovered over.
#CHANGING THE HOVER DATA OF SCATTER CHART IN EXCEL CODE#
item names).I'm just a beginner when it comes to using VBA code so I wondering if anyone could help me out There will not be the option to change Bounds and Units if the data is recognized as discreet values by Excel (e.g. Note that in order to adjust the Bounds and Units settings, Excel needs to recognize the data in an axis as a range of values (e.g. These, along with a couple of other settings in the task pane, determine the scale used to display your chart.
![changing the hover data of scatter chart in excel changing the hover data of scatter chart in excel](https://www.get-digital-help.com/wp-content/uploads/2013/02/Highlight-group-of-values-in-a-xy-scatter-chart-programmatically.png)
![changing the hover data of scatter chart in excel changing the hover data of scatter chart in excel](https://yodalearning.com/wp-content/uploads/2017/04/scatterplot.png)
![changing the hover data of scatter chart in excel changing the hover data of scatter chart in excel](https://i.pinimg.com/originals/f8/4b/74/f84b74aebf55f3a5e19791cc7210bc2f.jpg)
Excel displays a Context menu for the axis.