The trick was to replace
d3.scale.ordinal() .rangeRoundBands([0, size], 0.5);
d3.scale.ordinal() .rangeBands([0, size], 0.5);
because using rangeRoundBand rounding apparently introduces additional outer padding which is, on average, proportional to the length of the domain. This is the reason why in case of more than 50 bars I was able to see more space at the beginning and the end.
- How to control the space between the start of a bar and the axis in a bar-chart constructed using d3?
- How to increase the space between axis and axis label?
- How can I create a basic bar chart with unique counts on the y axis and a category on the x axis?
- How can I make a bar chart starting from the 0 point of the y axis and not from the bottom of the svg?
- How do you rotate the x and y axis in D3 bar chart
- How to add space between bars in a grouped bar chart in a nvd3 grouped multibar chart?
- How to modify axis labels in d3 for a stacked bar chart when the axis labels are mapped as part of the scale's domain
- how to start drawing a line with a space between y-axis and it using d3js
- How to add space between axis and line in D3 line chart?
- How can I get the d3.js bar chart start from 0 instead of from the top
- How can i set the tick text of x-axis between bar in a bar chart in c3.js or d3.js?
- Add a space between the axis and text with NVD3 charts
- how to animate the labels to flow with the donut chart with a start angle and end angle in d3.
- d3js - Stacked Bar Chart in Horizontal Axis - How do I set x so the bars are seperated?
- How can I put a space between the lines of a line chart using d3.js
- d3 Plus bar chart how to force fixed max y axis range independent of the max data value
- How to make bar chart with additional vertical lines below the x axis
- d3 make a individual bar Chart of week and Hours between and set the Item in the right Position
- How to plot stacked bar chart according to the custom Y axis in D3
- How to make axis label of stacked bar chart in the middle of ticks chart in D3?
- How to set up a reference index on horizontal bar chart and transition control
- How can I get the D3.js axis ticks and positions as an array?
- D3 grouped bar chart: How to rotate the text of x axis ticks?
- how to set the domain and scale on an axis on a nvd3.js multiBarChart
- Make simple bar chart using C3 with separate columns on the x axis
- Nvd3: How prevent to display chart between -1 and 1 if have all y values 0?
- Ticks only at the start and end of an axis
- D3 update dataset on click and redraw the bar chart
- D3.js - How to highlight the biggest and smallest (minimum and max) columns in a bar chart?
- how to add legend to a pie chart using D3js? And how to centralise the pie chart?
More Query from same tag
- Get constant interval of ticks value in d3.scaleTime()
- mercator causing blank d3 page
- D3 behave weird when I do a drag act which also trigger unexpected zoom function
- D3 v4 moving both circle and text at the same time
- Export an SVG from DOM to file
- Creating a BarChart with scala.js
- d3.js select by id not working. Not sure why not
- d3 join on object key within array
- How to highlight the similarity of the value between rows and columns?
- New to nvD3 - how can I make my unix timestamps appear as dates on the x-axis?
- MouseClick node event on d3 graph
- AngularJS + D3: First transition gets ignored
- D3 v4 Scaling Data to Range
- How do I display a d3.js circle pack graph with RoR?
- d3.js t.map is not a function
- Setting D3 svg.transition to go from slow to fast to slow
- Use d3 stratify to transform flat data to hierarchy data
- Draw svg points from geoJSON query and image using d3 library
- Grouped stack chart with D3.js
- d3.js: Confusion about the order in which the code is executed
- Pan, zoom canvas together with drag nodes in D3
- Multiple drag functions on d3 force drag layout
- Direct Force Layout customization - d3.js
- Uncaught ReferenceError: d3Scale is not defined ／ D3 V4 ／ rollup.js
- Path not showing in d3.js topoJson graph
- JSON - Expecting 'EOF', got ','
- Problems fitting a map in a container
- Transition on path in d3.js is not working
- How to Draw a Tornado Diagram by D3.JS?
- Why does the callback function called at the end and how to test the function?