You need to force the axis range by adding
.forceY([0,500]) to the chart instantiation.
This SO answer might be helpful. That should at least point you in the right direction.
- D3.js Line chart with relative min and max in Y axis
- nvd3.js-Line Chart with View Finder: rotate axis labels and show line values when mouse over
- D3 hide overflow of the chart area, when Y axis has a min and max
- NVD3.js line graphs fail to scale y axis to max and min values
- d3 bar chart with fixed bar width and fixed spacing to align in center axis line
- Show values on Y Axis as it is with Higher and lower limits NVD3 Line Chart
- D3.JS time-series line chart with real-time data, panning and zooming
- Line chart using ordinal x-axis with d3.js and nvd3.js
- d3 bar chart y axis ticks and grid lines above max value
- d3 v4 drag line chart with x and y axes
- Make a chart with area charts having both positive and negative y axis in dc or d3.js
- Error in A Simple D3 Line chart with Legend and Tooltips for D3v 3.5.13
- Multiples with x/y axis and mouseover example - line path shows wrong values
- How to create Stacked Line Chart D3, Multiple Y Axis and common X Axis
- Align lines and dots with x-axis values in line chart
- How to line up x axis on stacked bar chart with a line overlay in d3.js
- d3js gantt chart with date/time scale at the top and current day blue line
- Line chart not aligned with x axis
- D3 Bar and Linear Chart With Multiple Axis
- d3 horizontal bar chart with background and max value of 100%
- Incomplete line chart with missing points and missing lines
- Time series line chart is not sync with axis
- d3 bar chart with custom x axis and bar width
- NVD3 Line Plus Bar With Focus Chart only displaying half width of first and last bar
- How do you get JSON data and create a line chart with d3.js?
- D3 Multi Line Chart Not Displaying Properly With X Axis Value
- How to align x axis with bars respectively in Combo Chart (Bars and Lines)?
- Chart min max values from each given day using crossfilter and dc.js
- Why animated d3 svg line is not synchronized with the axis shift in IE9 but synchronized in IE11 and Chrome?
- Time in x-axis and data for the y-axis for line chart in d3.js doesn't match/show with what (data) is on JSON
More Query from same tag
- How do I loop through an inner array of values in d3 and add corresponding children elements?
- Why is nothing being displayed on the webpage?
- Sizing custom C3 piechart legend dynamically (using D3?)
- Using the Force-Directed Graph Example from bl.ocks.org
- dc.js Using two reducers without a simple dimension and second grouping stage
- Selecting last path of svg with d3.js
- D3.js Chart Transition Erroring
- D3.js chart is visible in Internet Explorer 11 but invisible in Internet Explorer 11
- Find color depending on integer value - quick algorithm
- NaN coordinates on D3.js v4 layouts
- Updating only those SVG elements where the underlying bound data has been modified
- What is wrong with the way I input Dates with the scaleTime() function in d3?
- Transition In D3 Bar Graph Not Working
- How to create stacked row chart with one row with dc.js?
- Set a specific color to a bubble chart
- Prevent Templates From Discarding DOM Elements
- Is it possible to allow the user to visually alter a graph?
- d3.js throws an error 't.slice is not a function'
- Using Sharp to turn svg to png corrupts text in node.js
- How to transition along a circular path with d3?
- force directed graph different cluster for different groups
- D3.js Trying to use histogram layout to draw rectangles
- dc.js bar chart with ordinal x axis scale doesn't render correctly
- Cubism d3 dependency with requirejs
- How to create axisLeft dynamic in D3.js
- D3 JSON data conversion
- Binding ds.js Scatter Chart to JSON data
- Restrict Panning of d3.js chart to One Direction
- How to change (transition) radius of each circle by pressing an update button in scatter plot?
- Cubism - Display of values in axis