score:0
Your graph starts at the 25th of Jan
If you use floor the month you can start with the tick of the month showing
var myExtent = d3.extent(data, function (d) { return d.date; });
myExtent[0] = d3.time.month(myExtent[0]);
x.domain(myExtent);
And you can also format the value (as in this case 2014 shows instead of Jan)
var xAxis = d3.svg.axis()
.scale(x)
.orient("bottom")
.ticks(d3.time.months, 1)
.tickFormat(d3.time.format("%b"));
Source: stackoverflow.com
Related Query
- nvd3 AngularJS date format issue - non-epoch
- Date format issue in d3 js
- Date format in D3.js
- Understanding nvd3 x-axis date format
- I'm getting JavaScript error "d.getMonth is not a function" when trying to format a date using d3.time.format
- Change date format for xAxis in nvd3 chart
- Correct date format for Rickshaw
- d3.js date time format specifier not working as expected
- printing date in different format on x-axis in d3.js
- javascript d3.js date string parsing issue
- date format in d3, would like to have month as an integer instead of decimal
- Multiple line chart not working with date format
- performance on parse date format [javascript]
- Json format issue in d3 pack layout
- d3 - how to format date on x-axis
- Parse date string with different date format
- How can I control the date format for d3 scaleTime and remove unwanted clock time ticks?
- Difficulty converting json string to date format in d3
- Text transformation and Datetime format issue on Linechart Zoom D3 V4
- nvd3 linebar chart y2axis time format issue
- date data is null, when i try to use parse to define time format
- D3 date format throwing 'd.getFullYear is not a function'
- d3 d3-timeline plugin date format
- Format date / time with d3.js
- nvd3 (d3.js) date format returns incorrect month
- d3.js change format of price and date
- Unable to parse date format in Javascript
- dimple js x-axis date issue with bar chart
- Cal-HeatMap - How to format date and value in subDomainText cell
- d3 custom date format
More Query from same tag
- Counting distinct values from JSON using D3.nest()
- IE9 detects z-index events different than Chrome/Firefox - how to fix?
- How to Uniformly distribute svg circles in d3
- SVG expand line verticaly
- Bar charts and labels not sorting correctly
- Simple circle animation is only displayed the first time
- d3 zoom by class name
- Uncaught TypeError: d3.arc(...).outerRadius(...).innerRadius(...).text is not a function
- How to stop images from rotating in d3.js graph?
- Tooltips/Markers not appearing after transition
- How to access values from a nest in D3.js?
- To show all content, svg needs 9000px - Is there a method to force a line break?
- d3 xhr adding loading cursor
- d3.js v4: Trying to fix a subset of graph nodes
- splitting text for some bold and some not on functional javascript piece
- Passing django url with tag to d3 js
- d3.js error after installing c3.js in angular2
- mousemove callback on a path element in d3js
- creating multi-line charts as a reusable component
- D3.js: Remove force.drag from a selection
- how to make d3 gantt chart installable to other computer?
- D3.js change width of container after it is drawn
- Logarithmic range
- How to structure nested nodes that need updating in d3 v4 force layout?
- Black area when exporting graph from svg (d3.js) to jpg
- d3 rangeRoundBands Padding
- d3 event callback context changes in Babel
- Rendering a family tree with d3 or cytoscape
- Why is d3.select().style() not applied to <div>-elements?
- How to render object data in D3?