{"action":"opened","issue":{"url":"https://api.github.com/repos/google/google-visualization-api-issues/issues/17","labels_url":"https://api.github.com/repos/google/google-visualization-api-issues/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/google/google-visualization-api-issues/issues/17/comments","events_url":"https://api.github.com/repos/google/google-visualization-api-issues/issues/17/events","html_url":"https://github.com/google/google-visualization-api-issues/issues/17","id":74489012,"number":17,"title":"Error in documentation of getSelection() for table with view","user":{"login":"orwant","id":9052763,"avatar_url":"https://avatars.githubusercontent.com/u/9052763?v=3","gravatar_id":"","url":"https://api.github.com/users/orwant","html_url":"https://github.com/orwant","followers_url":"https://api.github.com/users/orwant/followers","following_url":"https://api.github.com/users/orwant/following{/other_user}","gists_url":"https://api.github.com/users/orwant/gists{/gist_id}","starred_url":"https://api.github.com/users/orwant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orwant/subscriptions","organizations_url":"https://api.github.com/users/orwant/orgs","repos_url":"https://api.github.com/users/orwant/repos","events_url":"https://api.github.com/users/orwant/events{/privacy}","received_events_url":"https://api.github.com/users/orwant/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/google/google-visualization-api-issues/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"},{"url":"https://api.github.com/repos/google/google-visualization-api-issues/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-08T20:42:57Z","updated_at":"2015-05-08T20:42:58Z","closed_at":null,"body":"Original [issue 18](https://code.google.com/p/google-visualization-api-issues/issues/detail?id=18) created by google-admin on 2009-08-04T21:44:58.000Z:\n\n<b>What steps will reproduce the problem? Please provide a link to a</b>\n<b>demonstration page if at all possible, or attach code.</b>\n\r\nLook at this page of documentation:\r\nhttp://code.google.com/apis/visualization/documentation/reference.html#standardproperties\r\n\r\nThe section about &quot;getSelection()&quot; says the function returns an array of\r\nobjects where &quot;each object has properties row and/or column, with the index\r\nof the row and/or column of the selected item in the underlying DataTable.&quot;\r\n\r\nHowever, if you pass a DataView rather than a raw DataTable to the Table\r\nvisualization, you get the row and column index of the _DataView_, not of\r\nthe underlying DataTable.  I'm guessing this is an error in documentation\r\nrather than a bug.\r\n\r\nA minor modification of the &quot;Select Event&quot; sample code proves that the\r\nindexes refer to the DataView rather than the DataTable:\r\nhttp://savedbythegoog.appspot.com/?id=ag5zYXZlZGJ5dGhlZ29vZ3ISCxIJU2F2ZWRDb2RlGL7pxQEM\r\nI wrapped the data in a view and hid row 0.  Now the alert message is\r\noff-by-one in reporting which row you clicked, since it refers to the\r\nDataTable rather than the DataView.  \r\n\r\nYes, I know I can easily fix the code by referring to the rows in the view\r\nrather than dataTable-- my point is that the documentation should state\r\nthat the getSelected() method will refer to the view, rather than the\r\nDataTable, if you use a view.\r\n\r\n<b>What component is this issue related to (PieChart, LineChart, DataTable,</b>\n<b>Query, etc)?</b>\n\r\n\r\n<b>Are you using the test environment (version 1.1)?</b>\n<b>(If you are not sure, answer NO)</b>\n\r\nNO\r\n\r\n<b>What operating system and browser are you using?</b>\n\r\nI confirmed this behavior worked as described above on:\r\nChrome on Windows XP\r\nFirefox on Redhat\r\nFirefox on Windows XP\r\n\r\n<b>*********************************************************</b>\n<b>For developers viewing this issue: please click the 'star' icon to be</b>\n<b>notified of future changes, and to let us know how many of you are</b>\n<b>interested in seeing it resolved.</b>\n<b>*********************************************************</b>\n"}}