JavaScript D3/SVG: How to resize a d3.svg.axis with time scale by modifying range? d3 resize axis,d3 responsive axis

I must be missing something obvious. Turning to SO after a day of frustrated headbanging ;-) :

Given that I have created a time domain axis using d3.time.scale and d3.svg.axis, how can I later modify the size of my axis by changing the range? (Keeping the domain but in effect changing the size of the resulting axis)

I have read and followed many different examples, but either they do not use a time scale, or just change the domain. The closest I got is http://bl.ocks.org/d3noob/7030f35b72de721622b8, but I can't seem to get the pattern from that example to work.

I have a codepen at http://codepen.io/anon/pen/MaZJYM The code is a bit funny since I have cut bits and pieces out of my code which is in an ES6 class, but it shows the problem exactly: Press the button. Nothing (Except a strange text anchor change??) happens when I change the range and re-run the axis calls as in the linked example.

Answer:1

I am trying to translate my application using react-i18next. I know how to use it with simple const components, but not within a class. I'm working with the I18nextProvider. This is my App.js file. ...

I am trying to translate my application using react-i18next. I know how to use it with simple const components, but not within a class. I'm working with the I18nextProvider. This is my App.js file. ...

  1. using react-i18next
  2. react in i18next
  3. use translation react i18next

I'm trying to efficiently make a key-value tour in an array in reactjs. However, I do not know how to display the "key" array without creating another map function. const equipos = [ { key: [ ...

I'm trying to efficiently make a key-value tour in an array in reactjs. However, I do not know how to display the "key" array without creating another map function. const equipos = [ { key: [ ...

Here is the code: function fil(val) { console.log('fil'); // never written to console when run in greasemonkey return true; } var temp = unsafeWindow.someobject; console.log(temp); // looks fine ...

Here is the code: function fil(val) { console.log('fil'); // never written to console when run in greasemonkey return true; } var temp = unsafeWindow.someobject; console.log(temp); // looks fine ...

  1. what could stop you from getting a passport
  2. what could stop you from getting pregnant
  3. what could stop the ocean currents
  4. what could stop my period
  5. what could stop a car from starting
  6. what would stop diarrhea
  7. what would stop you from being drafted
  8. what could stop your car from starting
  9. what could stop me from getting pregnant
  10. what would stop you from getting drafted
  11. what could stop implantation
  12. what could stop global warming
  13. what could stop climate change
  14. what could stop your period from coming
  15. what could stop your period
  16. what could stop menstruation
  17. what could stop brexit
  18. what could stop periods
  19. what could stop ovulation
  20. what could stop me getting a mortgage

Is that me doing something wrong or some known bug of using scope operator ([...arr]) with Date()/Date.UTC() constructor? What confuses me: x = [2015,5,1]; //(3) [2015, 5, 1] new Date(2015, 5, 1); //...

Is that me doing something wrong or some known bug of using scope operator ([...arr]) with Date()/Date.UTC() constructor? What confuses me: x = [2015,5,1]; //(3) [2015, 5, 1] new Date(2015, 5, 1); //...