score:3
Accepted answer
Simply retrieve inverted values of the beginning and ending points of your scale, which apparently are 0 and width of the scale:
var startDate = x.invert(0);
var endDate = x.invert(width); // where width is the visible width of the x scale
Source: stackoverflow.com
Related Query
- How to get the boundaries of currently visible time scale (after panning and zooming)?
- D3 - How to get correct scale and translate origin after manual zoom and pan to country path
- How to limit the zoom of a time scale in d3.js to the minute?
- How can i get the new X and Y position after rotating?
- D3 Zoom & Pan - How to enable zooming & panning anywhere on the chart and restrict showing circle within the range while panning & zooming
- D3.js: How to get the computed width and height for an arbitrary element?
- How can I get the D3.js axis ticks and positions as an array?
- how to set the domain and scale on an axis on a nvd3.js multiBarChart
- D3js: How do I clear the zoom scale set by the d3.zoom event?
- how to get the type of a scale in D3?
- How to set the domain and scale on an yaxis on a discreteBarChart nvd3.js
- d3.js - Having a tree layout, how to change the X-axis to use a time scale in D3?
- d3 zoom and brush working at the same time
- How can i get the startAngle and endAngle of each arc in the sunburst example using d3.js?
- How can I get the natural width and height of an svg image element?
- How do I get D3 Data Driven Document to display a moment.js datetime in the correct time zone?
- Draw a map with D3.js: How to get the right scale() and translate()?
- D3 word-cloud: how to auto size the font so words will not run out , and to scale words to all the screen?
- D3 scatter plot - visible points outside the chart after zoom
- How to get the width and height of an image? ( getBBox() size of SVG return 0 )
- D3.js how to get the position/offset of x and y axis
- How can I apply a time scale and show my data in intervals of "n" years?
- Create a padding for the first and last data points using a time scale
- d3 time scale add before and after time range a percentage of time interval
- Changing time scale from days to weeks, how do I update and sum data values?
- Leaflet: How to get pixel position of a lat lng after zoom, before zoom begins
- How to get the minimum and maximum value between a given range in data set in d3.js
- How to have the same scale in both x and y
- d3js. Coordinates after zoom and pan. How to calculate it?
- I am trying to build a d3js graph but on the x-axis i am getting the timestamps instead of date and time even after i used formatting
More Query from same tag
- How to toggle lines in a line chart using a legend
- Any one know how to Apache hive data visualization using D3js?
- d3 : coloring dots on a scatterplot using column in dataset
- Dynamic Arrowhead Color
- Cubism - value for selected time and row
- My chart lines are not in order
- D3.js Adjust labels closer to each other
- d3 zoom behaviour is overwriten by mousemove event
- D3JS - Combining "rect" functions
- Is there any way to convert Matplotlib figure objects to SVG or D3 graph?
- D3 Horizontall tree - Collapse everything at startup
- How to embed bitmap into D3js generated SVG code?
- How to format a date using d3's time.format
- rendering issue in d3 radial bar chart with labels
- d3 topojson wont generate state outlines
- Why <marker> doesn't orientate as the <path>
- Inserting title in line chart on d3.js
- Does it matter which term I pass to d3.selectAll() during a data join, if whatever I append seems to rely solely on the .append() call?
- styling the browser generated rollovers for svg title tags
- How to use d3fc-label-label.js on a map?
- D3 Force Layout Tick Fn - nodes.attr() is not a function
- d3 v4 Stacked to Grouped Bar Chart from CSV
- Disabling all D3 animations (for testing)
- selectAll("g").data(data).enter().append("g") does not work?
- Update/toggle/filter bar graph based on user's <select>
- How do I set the X values for a singled stacked horizontal bar chart using d3.js?
- d3.js month.range interval issue
- Angular 2 definition file
- Unwanted bonding lines (dynamically created) in d3
- D3 TypeError: link.exit is not a function link.exit().remove(); What am I doing wrong?