score:16
Accepted answer
it seems you are missing the <style>
section from that example. the fill: none
is what tells the line not to close from the last point to the first one:
.line {
fill: none;
stroke: steelblue;
stroke-width: 1.5px;
}
you are telling it to use this class:
.attr("class", "line")
but if "line" doesn't exist in referenced css or inline styles you will get the default fill behavior.
see also: d3.js tree with odd number of vertices, edges not shown
Source: stackoverflow.com
Related Query
- d3js line chart error - drawing weird area
- d3js error while drawing the chart
- Error parsing data when drawing d3 line chart
- drawing a rectangle on line chart in d3js and nvd3
- D3js line chart error "attribute d: Expected number, "M49,NaNZ"."
- Drawing line outside of axis in d3js line chart
- D3js line chart not transitioning, Tooltip error on new bars
- How do I get my area filled beneath my d3 line chart to be a gradient?
- Build D3js Area Chart with negative values
- Error in A Simple D3 Line chart with Legend and Tooltips for D3v 3.5.13
- d3js line chart -- how to extend last step to end of range?
- D3js - Getting a line chart drawn, from "JSON data" input using d3.json
- add circle in a spiral chart with d3js with line connecting to center
- d3js gantt chart with date/time scale at the top and current day blue line
- Append a line to an end of a path in area chart d3
- d3js chart dots and area not updating
- d3js - line chart `circle` placement to the lines are not properly sets
- Using generic function for drawing line d3js
- how to start drawing a line with a space between y-axis and it using d3js
- d3js multi-line chart is being drawn off the plot area - is update pattern to the issue?
- Undesired shaded area when exporting NVD3 line chart to PNG
- Add vertical line to d3js bar chart
- D3js unable to show gradient area chart
- d3js - my line chart is not working
- 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 error displaying datetime on x-axis line chart
- Drawing a d3 realtime line chart inside socket.on (socket io)
- Looking for a D3 way of drawing a mean line for a multil-series line chart
- Error parsing d3 line chart 2d data
More Query from same tag
- Gradient color in a treemap for D3
- Basic example of rendering a d3 SVG with a backbone View
- Polylines in D3 and Legend spacing
- Labels do not display with D3 v4 bar chart
- Changing Ticks values to text using D3
- D3.js: Placin' the text on the arcs of the doughnut chart
- How to convert DataFrame into nested JSON
- How to generate multiple panels of multilines plots in D3?
- D3.js - How to map continuous domains to discrete ranges with scales?
- placing multiple d3 charts on the same page but applying different styling
- Javascript running intensive visualization operation without freezing the browser
- Using Drop-down menu with D3 force layout graph
- D3 bar chart not showing first element in array
- Set D3 line stroke according to deviation
- d3 tooltip hovering issue
- Vertical scroll bar in d3
- dc.js - Tooltips adding another item?
- How do I give certain edges a class?
- Append is not a function in d3.js?
- d3.js- noob- how to bind data to path from external svg by path ID?
- Put text in the middle of a circle using. d3.js
- How to rotate shape with transform
- D3 tooltip - keep mouse on tooltip with html elements
- What is the difference between D3.js and Cytoscape.js?
- Zoomable Treemap with more than two levels, D3plus?
- d3.js mouseover events clashing
- Merge objects that share a common key or value
- How to set default value to dc selectMenu
- D3 zoom in on brush extent
- nvd3.js scaling xAxis by number of points in json (lineChart)