If you want to know the row number of the straight table, you could capture that information only in the chart itself using rowno(). Otherwise, if it's about record number, you could use rowno() in the script and use that at the front end.
Add reco=no() or rowno() function along with the data in the script then row number will be fixed , then in the front end you can make use of the getfieldselection() and you can hide and show the objects
Selections are not applied to rows or sheet objects. Any selection on a table is a selection of the relevant dimensions. If the row number is a dimension, you could check the selected values and use that for the show or calculate condition.
If the row number is not a dimension, you will need to do a ranking based on the table dimensions and the sort order, which might be quite complex.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein