Skip to Content
author's profile photo
Former Member

Is it possible? tableView visiblerows display in chart?

Is it possible to link a tableView and a chart together? I have a tableView that shows 7 rows of data, I'd like to have a chart linked to that, that shows the chart values of those 7 rows and if someone changes the tableview (navigates) the chart updates with it?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Posted on Jul 26, 2004 at 01:14 PM

    I would assume I have to catch the current table rows from the event, however the question is - are the values currently displayed in the event as well?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Brian McKellar

      So I got it working, now to start with my next Weblog I think 😉

      * Find current row of table view
          IF linkToTable EQ 'true'.
            data: table_event TYPE REF TO cl_htmlb_event_tableview.
            table_event = table->data.
            selectedrowindex = table_event->visibleFirstRowIndex.
            IF selectedrowindex NE 0.
              selectedrowindex = selectedrowindex + numberWeeks.
            read table WMY_STATS INTO MY_STATS index selectedrowindex.
            IF MY_STATS-SDATE NE '00000000'.
              clear s_date.
              clear e_date.
              s_date = MY_STATS-SDATE.
              e_date = MY_STATS-SDATE - numberWeeks.

      What I do in the BSP Extension is first check if the tableView and the Chart should be linked together. I then check which index the table is on and if it's more than 0 I adjust the record index for the proper data (since I show 14 days at a time there) then I get the date from the new field (perahsp theres a better way??) and create my chart showing the new adjusted dates.

      The chart I simply loop through the table data and create the new DATA for the chart - data being