There're two small problems with your code. First, the range of a scale needs to be specified as a two-element array, i.e. instead of
Secondly, you need to pass the data in as a one-element array (as there's only a single line), i.e.
Complete jsfiddle here.
- Error parsing d3 line chart 2d data
- Error parsing data when drawing d3 line chart
- Error parsing d3 line chart JSON data
- Error while plotting line chart from JSON data
- NVD3 line chart with realtime data
- d3js line chart error - drawing weird area
- line chart of json data in d3
- How to plot animated line chart using d3 while the data table is required to be updated every 1 second?
- Error in A Simple D3 Line chart with Legend and Tooltips for D3v 3.5.13
- Dictionary data ito d3 line chart - Django Python in server side
- Grouped bar chart with zoom and updateable data error
- C3js - combination chart with data labels only for line
- D3.js: plot dots on the existing line in a multiseries line chart with long formatted data
- Loading new data to a C3.js line chart
- NVD3 Line Chart doesn't display when data passed using ajax - data.map is not a function
- Make a line chart in D3.js loading data from an array
- Simple D3.js line chart with data that are values collect every hours
- D3 line chart does not show tool tip and data points properly
- how to display data from 1st point on words on y axis for line chart in d3.js
- d3 line chart using a sorted data set
- Data join in a line chart
- zoomable d3 line chart has disappearing data
- How do you get JSON data and create a line chart with d3.js?
- Error displaying dots on a multi series line - dots chart
- How do you add multiple lines to a D3JS line chart where the depedent variable data sources start at different positions along the range?
- d3 v4 line chart data
- d3 error displaying datetime on x-axis line chart
- Adding data label in D3 Line chart (for Power BI)
- How to change color of a data point in line chart according to a condition?
More Query from same tag
- d3.js force layout namespace in a backbone view
- D3.js: d3-delaunay - how to get started?
- Horizontal pan with ordinal x axis in d3
- how to display vertical grid with time series data using react-native-svg-charts
- Distribution of n-set of circles along optimal circumference
- Adding child elements to specific nodes in a force-directed graph using d3js
- How to implement D3 scales to have children inherit colour from parent with graduations?
- D3 Force Directed Graph click event not working
- Stacked chart with data array in d3 js
- Stacking font-awesome icons within SVG
- D3 auto updates when array length change
- Error while rendering D3 pie chart (not displaying properly)
- Do AngularJS Directives for D3JS exist?
- What's the idiomatic way to sync transitions so that adjacent shapes move together?
- How to call function inside d3.json()
- How to create SVG shapes based on data?
- Stroke on rect in D3 blurry
- IBM Cognos Analytics with D3.js Bar Chart height problem
- Is it possible to add zoom and tooltip on the same line chart in d3js?
- Weird x-values when plotting live time series in D3.js
- custom d3 linear scale that returns null for null values instead of 0
- I dont know why x.bandwidth = 0 in d3
- Append a table onto a svg by id using d3
- Add labels to a map using d3js
- get the position details of a div inside an svg
- Export d3-generated HTML table as CSV (must work on IE too)