Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I've tried using the built-in scatter plot chart and the Google scatter plot gadget. I haven't been able to figure out how to get either one to allow me to label the points in the chart. I have data like the following:

| Name1 | 36 | 1 | 
| Name2 | 22 | 3 |
| Name3 | 21 | 6 |
| Name4 |  4 | 2 |
| Name5 |  8 | 2 |

Please help me understand how to get the point at (8,2) on the scatter plot to have the label Name5 and so on.

share|improve this question

migrated from superuser.com Dec 18 '10 at 1:28

This question came from our site for computer enthusiasts and power users.

add comment

1 Answer 1

up vote 0 down vote accepted

Using a cell_object instead of just a value worked for me

var data = google.visualization.arrayToDataTable([
          [ {v: 36, f: 'Name1 - 36'}, 1],
          [ {v: 22, f: 'Name2 - 22'}, 3],
          [ {v: 21, f: 'Name3 - 21'}, 6],
          [ {v: 4, f: 'Name4 - 4'}, 2],
          [ {v: 8, f: 'Name5 - 8'}, 2]
        ]);
share|improve this answer
1  
that's using the api, right? How would I do that within my google docs spreadsheet? –  digitaljoel Sep 26 '12 at 13:50
1  
Yes that is using the api. Using a google docs spreadsheet the only way I can work out how is by using a Bubble chart and formatting like you have in the questions –  Glen Blanchard Sep 28 '12 at 1:09
    
The bubble chart is new since I asked this question. I was able to add it to my chart and it worked alright. Thanks for the pointer. –  digitaljoel Oct 1 '12 at 16:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.