React+D3.js - No Solution because there is no problem

React+D3.js - No Solution because there is no problem
0

#1

That’s the Graph:

The graph is being shown but when I click the arrow buttons nothing changes…

// Allow the arrow keys to change the displayed year.

  window.focus();
  d3.select(window).on("keydown", function() {
    switch (d3.event.keyCode) {
      case 37: year = Math.max(year0, year - 10); break;
      case 39: year = Math.min(year1, year + 10); break;
    }
    update();
  });

Should I change it a bit to make it fit the React concepts?