PDA

View Full Version : Chart - Excel 2013 - Series Highlight on Label mouse over



Ehcacommence
12-09-2017, 12:18 PM
Hi all !

Firstly, I should probably mention that I "cross posted" this thread. (i.e. https://www.ozgrid.com/forum/forum/help-forums/excel-vba-macros/1196780-chart-excel-2013-serie-highlight-on-label-or-chart-column-mouse-over)

I beleive that what I want Excel to achieve would require a macro, I might be wrong though, but I found no other mean to get what I want.

I am sorry, I will not be able to provide anyone willing to help with a sample code because I am, at most, an unskilled beginner having no idea of how to write such a macro. I did look for it on the Internet but didn't find anything relevant.

Right, given that, let me get started.

21135

Here is attached a showcase excel file. I'm working on Excel 2013.

The column A contains several Identities (long identities, no very reader friendly when used for a chart, but I need them to remain what they are for the chart to be relevant).
The column B contains data corresponding to column A identities.

I create a chart to expose column B data as a function of column A identities, column A identities are then series.

I have labels over the columns of the chart, and series shown at the bottom of the chart.

Because I could have to use huge numbers of different identities, I would like the chart columns to let the user know what is the serie that column is related to. Excel does that on its own with a simple mouse over on the chart columns, with a pop-up window that is not very reader friendly:

"Series "Identity that is way too long 1" Point "Data" Value: 1196"

Because these identities are so long and I can't possibly make them any shorter, I can't have every single Identity standing on the top of the chart column it belongs to.

So what I would like to achieve is :

On a chart column (or on a label, if it is easier than a chart column) mouse over, the serie it is related to is highlighted in the Legend entry.


That is it ! (On the sample file I did not put labels for every single column but that would usually be the case).

If anyone is willing to share with me how to achieve this, that would really help me out ! :p

Thanks a lot for reading, and an even bigger thank to anyone trying to help !


Cheers,
Ehcacommence.

Kenneth Hobs
12-09-2017, 02:04 PM
cross-posted https://www.ozgrid.com/forum/forum/help-forums/excel-vba-macros/1196780-chart-excel-2013-serie-highlight-on-label-or-chart-column-mouse-over

Ehcacommence
12-09-2017, 02:53 PM
Hi.

Would you please tell me why is asking guidance from different Excel users communities an issue ?

Regards,
Ehcacommence

Ehcacommence
12-09-2017, 03:15 PM
Right, I looked into it, and now understand it might mean a loss of time for people willing to help.

Poor sightedness on my side, I am not used to ask for help on forums. I guess I should have foreseen that.

I will make sure I mention the fact that I "cross posted" for any further help I ask.

Apologies, I didn't mean to be self-centered.

Regards,
Ehcacommence

Kenneth Hobs
12-09-2017, 04:48 PM
It is a common thing for new users. Maybe you read this about cross-posting. https://www.excelguru.ca/content.php?184

I don't know of a way to highlight a legend label by mouseover of the bar columns right now. I'll look into it more.

Of course you can change the legend's label but I don't think that would meet your need. Most would just change the label values in the cells though. I guess there might be a case sometime where this might be of some limited use. We can change the points label(s) in a similar way as well. In a Module:

Sub SetSeriesNames()
Dim c As Chart, i As Integer
Set c = Sheet1.ChartObjects(1).Chart
For i = 1 To c.FullSeriesCollection.Count
c.FullSeriesCollection(i).Name = "Label " & i
Next i
End Sub

Kenneth Hobs
12-09-2017, 05:51 PM
This looks like it would work for you. https://peltiertech.com/highlight-a-series-with-a-click-or-a-mouse-over/

You will need to select the chart after running the Module code to set the chart to do it. Run the other Sub in that Module to unset that option. Once the chart is manually selected, move the mouse over the bars to see the labels change font color and with the border color around the bar.

Obviously, you need the Class and Module code as Jon Peltier explained which I included in the attachment.

Ehcacommence
12-09-2017, 07:07 PM
Thanks for your answer, but I am afraid I haven't my point crystal clear.

What I would need is to get a highlight on series in the Legend part of the chart when the mouse is either over a bar or over a label.

So, in the example I gave, that would mean "Identity that is way too long 1" would be highlighted if the mouse was over the first bar (or first label, not as good, but would proably be good enough). "Identity that is way too long 2" would be highlightd if the mouse was over the bar it corresponds too, that is the second bar of the chart. And so on.

Again, thanks for your answer though.

Kenneth Hobs
12-09-2017, 07:37 PM
Did you not try my file and follow my instructions? It does it only for the bar mouseovers.