Draw Control with Disabled UI

15 views
Skip to first unread message

Sreyas Chintapalli

unread,
Jan 6, 2017, 3:03:54 PM1/6/17
to Google Visualization API
Hello,

I am currently designing a website that draws a Dashboard with a bound ChartRangeFilter and Line Chart. After the user is done making changes, using URL search parameters, a user's 'session' is saved to a web address.

 I want to redraw the dashboard and chart, if you access the web address, but not allow this redrawn dashboard to be interactive, i.e. the user can no longer move the thumbs of the ChartRangeFilter.

I have everything so far to have the chart redrawn and set to the state the user left it in, but am wondering if it is possible to redraw the controller but disable the ability to drag the thumbs.
Code excerpt:

var controller= new google.visualization.ControlWrapper({
      'controlType': 'ChartRangeFilter',
      'containerId': 'control' + x + '_' + y,
      'state': {
        'range': {
           'start':new Date(range[0]),
           'end': new Date(range[1])
          }
       },
      'options': {
       'enableInteractivity': false,               ~~~~~~~~~~~~~~~~~~~~ This line does not actual disable thumb sliding, is there a way to do this?
        'filterColumnLabel': 'Time',
        'ui': {
          'chartType': 'LineChart',
          'chartOptions': {
            'enableInteractivity':true,
            'title': "Clipping Tool for " + partId,
            'width': 750,
            'height': 185,
            'colors': zoneColors
          },
        }
      }
})

Thanks!
Sreyas
Reply all
Reply to author
Forward
0 new messages