1

i want the default x Axis Time Scale like in this exmaple from Bostock. https://bl.ocks.org/mbostock/431a331294d2b5ddd33f947cf4c81319

How can i change the ticks at the x Axis by Zooming. So i want that at the first that there are years on the X axis for exmaple ( "2006", "2007",...). This is okay. But when i zoom the ticks changes to ("2006, "April", "July", "October", "2007"). This is what i dont want. I want there are all 12 Months and not only "April", "July", "October". When i continue zooming the there are all 12 Months. This is okay.

My Question is how can i disable that "April", "July", "October" is shown at the x Axis.

otto
  • 1,815
  • 7
  • 37
  • 63
  • Take a look [here](https://stackoverflow.com/questions/29385146/changing-ticks-values-to-text-using-d3) – mutantkeyboard Apr 20 '18 at 12:03
  • 1
    if i chage ticks it will not update by zooming. I want to update the ticks but only with full years and full months – otto Apr 20 '18 at 12:06
  • Aha. You can use `tickValues` for that as suggested by @mbostock himself - [here](https://stackoverflow.com/questions/13100314/change-the-ticks-on-x-axis) , and API is [here](https://github.com/d3/d3-axis/blob/master/README.md#axis_tickValues), so you can pass your values into the Array, and as suggested on the first post you can use x Domain to calculate the difference. – mutantkeyboard Apr 20 '18 at 12:29
  • mmh dont know how to do this with dates... – otto Apr 20 '18 at 12:33

1 Answers1

-1

try to use VIS JS Check below link http://visjs.org/examples/timeline/interaction/limitMoveAndZoom.html

Siva Rm K
  • 284
  • 1
  • 6