Excel Scatter Chart with Labels

12

2

I have three columns of data. Column 1 has a short description, column 2 has a benefit number and column 3 has a cost. I can create a cost/benefit scatter chart, but what I want is to be able to have each point in the scatter chart be labeled with the description. I don't care if you can see it on the chart or you have to roll over the point to see the description.

Leigh Riffel

Posted 2010-09-29T14:00:27.750

Reputation: 1 646

Ran into the same problem today. I don't believe MS didn't implement such basic and useful feature in 30 years! – Michael – 2018-03-27T22:49:21.573

Answers

6

Toc

Posted 2010-09-29T14:00:27.750

Reputation: 1 663

1In addition to this fine add-in, Excel 2013 now has an option to add labels from cells. Add any old arbitrary labels first, then format them to access this option. – Jon Peltier – 2014-10-05T15:57:17.877

+1 Looks good. I already did it the manual way, but this add-on looks useful for when I need to do this again. – Leigh Riffel – 2010-10-01T12:59:43.010

+1 Excellent link! Wish I could up vote it more than once. BTW, works for all chart types with labels, not just XY. – DaveParillo – 2010-10-06T03:11:24.620

2

I propose one tool named Funfun that can solve your problem. With this tool, you can use an external JavaScript library to plot the scatter chart with a description that meets your needs.

I wrote a function for your problem. Here's the code of the main part:

<script>
    var data = $internal.data; // use Funfun API to get the data
    var plot_data = [];
    for(var i=0; i<data.length; i++){ // data preprocessing to fit in Plotly.js
     var trace = {
      x: [data[i][0]],
      y: [data[i][1]],
      type: 'scatter',
      name: data[i][2]
     };
     plot_data[i] = trace;
    }
    var layout = {
      title: 'Data Labels Hover'
    };
    Plotly.newPlot('myDiv', plot_data, layout); // use Plotly.js to plot the chart
</script>

In Excel Online it's as shown below: you can write codes in the right pane. As mentioned in the code, I use plotly.js to plot the chart. enter image description here enter image description here

The link https://www.funfun.io/1/edit/5a3772cd45ac15144af3fe9d of this function. You can link this function to your Excel with Funfun and this URL.

Besides, Funfun also provides an online playground which shares the same database with Funfun in Excel add-in. You can also click the link above to see what it's like in website version. This function in Funfun website

P.S. I'm a developer of Funfun.

yi liang

Posted 2010-09-29T14:00:27.750

Reputation: 41

1If you have written a function that answers the question, please post the function in your answer as text.  Images are pretty useless to blind people (OK, so are charts) and links tend to break. – G-Man Says 'Reinstate Monica' – 2017-12-21T03:50:34.243

Ok, I'll fix it as soon as I can. Thanks for your advice. – yi liang – 2017-12-23T05:36:08.833

I've added the core code. – yi liang – 2017-12-23T09:36:01.750

Thank you, and thank you for disclosing your association with FunFun.   But, for your information, code doesn’t display properly unless every line is indented four spaces (I fixed the </script> for you), and “developer” is spelled with one ‘P’ (I fixed it here, but I can’t edit your profile).

– G-Man Says 'Reinstate Monica' – 2017-12-23T16:22:59.100

2

There's another free utility (and tutorial on how to create it) available for download here: http://www.wiseowl.co.uk/blog/s130/excel-charts-data-labels-problem.htm

cookieheadjenkins

Posted 2010-09-29T14:00:27.750

Reputation: 21

Pictures showing how the program works is very helpful too. – wbeard52 – 2015-10-02T03:27:23.457

Could you perhaps describe this utility? Maybe include a tutorial? Generally we prefer answers involve more detail as opposed to just linking – Simon Sheehan – 2011-11-11T21:46:57.530

1

At first, I thought you could accomplish this with a 'bait and switch' - make a plot of the data first, then edit the series. Doesn't work though. This works if and only if the numbers in column 'B' are whole numbers. The excel chart isn't really using any of the data in column B anymore.

The only way I have been able to reliably do this in the past is to make every row of data it's own data series. Painful, but if you want to see it in action, I have an example excel file.

DaveParillo

Posted 2010-09-29T14:00:27.750

Reputation: 13 402

+1 Every row of data as it's own series does work, but you are right it is painful to build. – Leigh Riffel – 2010-09-29T17:34:14.730

0

The wiseowl.co.uk utility worked for me. As a "tutorial" I would recommend

  1. Downloading this Excel worksheet, from part five of this blog and enabling macros http://www.wiseowl.co.uk/files/blogs/s130/i3.xlsm

  2. Move the button down and out of the way of your data if you have more than a few columns

  3. Paste your data in on top of the film data.

  4. Create scatter plots by selecting two column at a time and insert scatter (plot).

  5. Clicking on the button, which will add labels.

Easy.

Thanks to the folks that made it and recommended it.

timtak

Posted 2010-09-29T14:00:27.750

Reputation: 153