This is happening because the chart has 14 bars, but 15 tick marks.
The first tick mark should be the month prior to the start of your data set.
You can fix this by pulling forward the start of xTimeDomain by one month:
xTimeDomain = new Date(new Date(xTimeDomain).setMonth(xTimeDomain.getMonth()-1));
- Need help lining up x axis ticks with bars in D3.js bar chart
- How to align ticks with bars in horizontal bar chart / row chart
- Make simple bar chart using C3 with separate columns on the x axis
- d3.js bar chart sorting: can't figure out how to sort x-axis labels along with bars
- d3 bar chart y axis ticks and grid lines above max value
- Adding Error Bars to Grouped Bar Chart with D3.js
- DC.js bar chart with date axis
- dc.js bar chart with ordinal x axis scale doesn't render correctly
- Sorting the bars in a bar chart with dc.js
- d3 show labels only for ticks with data in a bar chart
- Specifying Ticks on D3 Bar chart with Time Series data and scaleBand
- How to line up x axis on stacked bar chart with a line overlay in d3.js
- d3.js v4 bar chart with negative values on y axis
- d3 bar chart with fixed bar width and fixed spacing to align in center axis line
- D3 Bar and Linear Chart With Multiple Axis
- d3.js bar chart with pos & neg bars (win/loss) for each record
- Create a bar chart with local storage data (drawing the bars doesn't work)
- d3 bar chart with custom x axis and bar width
- D3 v4 bar chart X axis with negative values
- D3 js bar chart with 24 hour x axis
- How to draw multiple bars in a row in a bar chart with spaces in between with d3v5?
- How to align x axis with bars respectively in Combo Chart (Bars and Lines)?
- DC.js bar chart x-axis labels not aligned with bars
- Chart bars not aligning with x axis values in d3.js
- How to sort bar charts synchronous with the ticks of x axis
- Sortable bar chart with long x axis labels rotated
- Horizontal Stacked Bar Chart with Two Y Axis Issues
- Cannot align ticks to bars in bar chart
- How can I create a basic bar chart with unique counts on the y axis and a category on the x axis?
- DC bar chart Y axis with integer scale (not multiplicated)
More Query from same tag
- D3v4: d3.timeParse fails with UNIX epoch seconds (%s)
- D3 output not rendering in Safari, Firefox, Edge and IE. Works in Chrome
- d3 radar chart in v5, cannot render 'path' object
- custom d3 linear scale that returns null for null values instead of 0
- data binding in d3.js
- Panning is not working properly with scatter plots
- jquery dialog box appended to d3 js tree on drag and drop
- selectAll("rect") selects all rectangles, but doesn't apply the mouseover function to some
- django and d3.tsv, not working
- d3 line chart and clip-path
- d3 rect not showing up
- d3.js: Hierarchical Edge Bundling change curveBundle for each link separately
- How to use d3.domain/range to have a custom domain
- d3.js circle hover animation
- Displaying Relative Time on x-axis with d3.js
- Attribute cy returning expected length error in D3 V4
- How to surround all selected SVG path elements with div in d3?
- d3 synchronizing 2 separate zoom behaviors
- How to use nest in d3 to group using the 'month' as key, but my csv file contains the whole date?
- Live drawing of a line in D3.js
- How to visualize the attention vector with a text heatmap?
- How to Set X Domain to Nested Value
- D3 Dependency Wheel not rendering properly
- Getting bound data without d3 info when using Force Layout
- R2D3's QUnit tests fail out of the box - what am I doing wrong?
- my own d3 custom color scale - interpolate a range from one given HEX to another
- Using generic function for drawing line d3js
- What is the best way to form age groups from a list in D3?
- Highlight selected node, its links, and its children in a D3 force directed graph
- Unable to apply both scale and translate to a set of element