React D3: How to use react-d3-tooltip and react-d3-zoom in the same chart?
<p>I am trying to create a Line Chart using <strong>React-d3</strong> (www.reactd3.org) with both the Tooltip and Zoom components.</p>

<ul>
<li><a href="https://github.com/react-d3/react-d3-tooltip" rel="nofollow">https://github.com/react-d3/react-d3-tooltip</a></li>
<li><a href="https://github.com/react-d3/react-d3-zoom" rel="nofollow">https://github.com/react-d3/react-d3-zoom</a></li>
</ul>

<p>However I cannot figure out how to use both components together.</p>

<p>I was able to create a simple <code>LineChart</code>:</p>

<pre><code>import {LineChart} from 'react-d3-basic';
import {LineTooltip, SimpleTooltip} from 'react-d3-tooltip';
import {LineZoom} from 'react-d3-zoom';

render() {
  var viewCountData = [
    {
      "date": new Date(2016, 5, 29),
      "Object1":11,
      "Object2":13,
      "Object3":16
    },
    {
      "date": new Date(2016, 5, 30),
      "Object1":23,
      "Object2":17,
      "Object3":15
    }
  ];
  var chartSeries = [
    {field: "Object1"},
    {field: "Object2"},
    {field: "Object3"}
  ];
  var x = function(d) {
    return d.date;
  };

  return (
    &lt;LineChart
      data= {viewCountData}
      chartSeries= {chartSeries}
      x= {x}&gt;
    &lt;/LineChart&gt;
  );
}
</code></pre>

<p>and add Tooltips by replacing <code>LineChart</code> with <code>LineTooltip</code>:</p>

<pre><code>&lt;LineTooltip
  data= {viewCountData}
  chartSeries= {chartSeries}
  x= {x}&gt;
  &lt;SimpleTooltip /&gt;
&lt;/LineTooltip&gt;
</code></pre>

<p>However I cannot figure out how to also use <code>LineZoom</code>. I tried nesting it inside <code>LineTooltip</code></p>

<pre><code>&lt;LineTooltip ...&gt;
  &lt;LineZoom ...&gt;
  &lt;/LineZoom&gt;
&lt;/LineTooltip&gt;
</code></pre>

<p>and also having both inside LineChart</p>

<pre><code>&lt;LineChart ...&gt;
  &lt;LineTooltip ...&gt;
  &lt;/LineTooltip&gt;
  &lt;LineZoom ...&gt;
  &lt;/LineZoom&gt;
&lt;/LineChart&gt;
</code></pre>

<p>but neither worked. Any help would be appreciated, thanks!</p>