score:1
Accepted answer
i would just append an svg line using your scales. as for the y values, use the border cases of your y scale, like so:
svg.append("line")
.attr("x1",x(53))
.attr("y1",y(data[0].date))
.attr("x2",x(53))
.attr("y2",y(data[data.length - 1].date))
.attr("stroke","blue");
i have tried it in your fiddle code, i put this code right after the "svg.append("path")" code.
Source: stackoverflow.com
Related Query
- D3 Chart: Adding a line to a date chart, without a date value
- d3 adding circles on the highest and lowest value on line chart
- dc.js line chart - Date Value issue
- Retrieving the value on y-axis from a dc.js line chart using the date
- Line Plus Bar Chart - Is there any way to pass date as string without formatting?
- Draw a vertical line representing the current date in d3 gantt chart
- Adding a horizontal line to d3 graph displays at the wrong value
- D3 - adding grid to simple line chart
- Visualize date specific data with a line chart in browser with javascript
- Adding Grid to D3.js Line Chart
- d3.js Adding a vertical line to a line chart at a specific point, by index
- D3 Line chart doesn't return correct value on ticks mouse over
- D3.js Error: Invalid value for <path> attribute for a line chart
- How to create a % difference arrow line with value in a bar chart using D3.js
- Multiple line chart not working with date format
- Adding hard coded fixed line to d3 bar chart
- Line chart not hitting the right value on chart and has a smooth line
- Draw multiple line chart using d3.entries key value pair
- D3 Multi Line Chart Not Displaying Properly With X Axis Value
- Adding color dynamically to a multiple line chart but it is not working in d3.js
- Adding data label in D3 Line chart (for Power BI)
- Date Ticks or String ticks as xAxis for line chart in d3
- Plotting line chart with date vs frequency in d3 by angular
- d3 multiple line chart tooltip value data undefined
- d3 line chart not showing,can not read in date data
- Adding transition to different lines in a line chart d3
- Adding axis to the dynamic line chart in d3
- Assign different colours to vertical lines in a line chart based on property value
- d3 chart is showing some decimal value in the X axis tick, instead of showing the date and time
- Incorrect Date Tooltip Line Plus Bar Chart nvd3.js
More Query from same tag
- Multiple paths with d3.js and google maps API
- D3 same ticks being showed twice on y axis
- Append Value to Rickshaw Graph Axis and what is ticksTreatment and Preserve
- How to rescale displayed data in d3.js?
- Can't reference data objects in d3js
- d3 world map with country click and zoom almost working not quite
- D3.JS - can't transform a selection
- Github SQL Server installation
- d3.js dendrogram : binding old and new properties to the svg element
- Locale for axis nvd3.js
- Passing variable i to D3 function
- how much can d3 js scale
- How to apply a filter and mesh to a D3 Choropleth
- Get value from json value key pair with D3
- Hide axis tick values under a certain range in d3.js
- D3 v4 drag/drop tree node into new parents children
- Undefined is not a function error d3js
- D3js Updating path parse error will breaking path for while
- d3 orbital using transform rotate
- Unexpected value translate parsing transform attribute
- Catch undefined TypeError from use of 'eval' in Angular?
- Uncaught error reading in json data to d3 force-directed graph
- Append a table onto a svg by id using d3
- Display image in d3.js from Android tablet image path
- d3js Dendrogram hiding Root node when graph become large
- Leaflet Choropleth Map and D3 Line Graph Interference
- best way to transfer data from flask to d3
- Adding an animated arrow on an offset Leaflet polyline
- Update the context line upon loading new data d3
- Translating EmberJS D3-Charts to AngularJS