title: React google-charts callback
body: <p>I want to create an event handler for Chart component from <a href="https://github.com/RakanNimer/react-google-charts" rel="nofollow noreferrer">react-google-charts</a></p>
  
  <p>Off. documentation has an example.</p>
  
  <pre><code>&lt;Chart
      chartType="ScatterChart"
      rows={this.state.rows}
      columns={this.state.columns}
      options={this.state.options}
      graph_id="ScatterChart"
      width="100%"
      height="400px"
      chartEvents={this.chartEvents} // &lt;- this is event handler
     /&gt;
  </code></pre>
  
  <p>chartEvents looks like</p>
  
  <pre><code>this.chartEvents=[
    {
      eventName : 'select',
      callback  : function(Chart) {
          console.log("Selected ",Chart.chart.getSelection());
      }
    }
  ];
  </code></pre>
  
  <p>How can I refer to class context from the callback function? I want to change my local state.</p>
  
  <pre><code>this.chartEvents=[
    {
      eventName : 'select',
      callback  : function(Chart) {
          // here I want to refer to this.setState
          console.log("Selected ",Chart.chart.getSelection());
      }
    }
  ];
  </code></pre>