score:1
Accepted answer
The problem comes from line
and line2
x functions where you give d.Date
as argument but date has been defined with a lowercase key in the source
object.
var line = d3.svg.line()
.defined(function(d) { return !isNaN(d.points); })
.interpolate("cubic")
.x(function(d) { return x(d.date); }) // <-- change to lowercase date
.y(function(d) { return y(d.points); });
var line2 = d3.svg.line()
.defined(function(d) { return !isNaN(d.points); })
.interpolate("cubic")
.x(function(d) {return x2(d.date); }) // <-- change to lowercase date
.y(function(d) {return y2(d.points); });
Source: stackoverflow.com
Related Query
- How to set a scale for the time series, current x scale gives me NaN?
- How can I set a minimum range for an interval for a time scale in d3.js?
- how to set proper domain for date time scale in d3
- how to set the domain and scale on an axis on a nvd3.js multiBarChart
- D3js: How do I clear the zoom scale set by the d3.zoom event?
- How to set the Origin (drag.origin) for drag behavior in d3 JavaScript library
- How to set the domain and scale on an yaxis on a discreteBarChart nvd3.js
- d3.js - Having a tree layout, how to change the X-axis to use a time scale in D3?
- d3js set tickValues for time scale axis
- How to limit the zoom of a time scale in d3.js to the minute?
- How to get the boundaries of currently visible time scale (after panning and zooming)?
- How to set the label for each vertical axis in a parallel coordinates visualization?
- How to increase time to read d3.json data for large data set and slow networks?
- Create a padding for the first and last data points using a time scale
- D3, Scale How to set the scale?
- How to spcify ticks on x axis for time scale in d3js?
- How do I set the X values for a singled stacked horizontal bar chart using d3.js?
- D3.js version 4: How to properly set the x-axis-intervals for a histogram
- d3.js plotting the graph on time series scale
- How to properly set the type for property `d` in `path` element in a d3 react typescript application
- How can I control the date format for d3 scaleTime and remove unwanted clock time ticks?
- How to set d3 color scale for each element in object array?
- How do I change the colour of my d3.js Bar Graph bars individually and make a Scale for them?
- How to configure x-axis and manually set start/end time for d3.js
- How to start D3 JS Tree to render in Collapsible Mode when loaded for the first time
- How to set up the scale with d3js?
- How to adjust the scale in the y-axis for a bar chart in D3 v6?
- How to change the shape of line to closed bars in existing time series diagram using D3
- Understanding how to select the Range for a scale
- d3.js: Is a time scale appropriate for the x-axis when only wanting to compare HH:MM?
More Query from same tag
- How to create slow simultaneous transitions of multiple attributes in force directed graphs?
- jquery .ready() equivalent in d3js?
- get data into correct format to create an area chart
- Reference errors using dc.js, d3.js and crossfilter
- Angular 2 D3 tree is not rendering correctly
- Typescript + React + D3v4: `Object is possibly 'undefined' error`, at d3 scaleBand
- Using D3 in Modular ES6
- automatically set dimensions of d3/dimple data visualization for legibility
- Javascript return OR with assignment of value?
- How does datamaps display images instead of bubbles?
- Clickable datapoints that launches closeable modal window in d3 chart (nvd3)
- Prevent text from rotating on the TextPath
- Add labels to D3 line
- How do I influence link distance in 3d-force-graph?
- d3.js selectable tree diagram
- How to pass a Json String from mvc controller to a d3.js chart?
- Outputting SVG Graph from D3.js Using Phantomjs
- selecting a column of a matrix created from a list in d3
- Parsing text file to objects in an array in javaScript
- D3 Redraw Y-axes dynamically
- Visualising Neo4j graph in a web page
- How to fix ".join is not a function" when trying join after selectAll?
- D3 - axis only show values from 0-1
- Load local .csv with js and process it with d3.js
- Sharing getter/setter functions across Javascript code
- Appending and Using JSON files with Javascript code on Ruby on Rails Pages
- NVD3.js - MultiLine Chart Multiple x-axis
- d3 csv parser on progress value
- Add a slider in d3.js element
- D3.js linegraph: How can I apply the interpolation also to line marker positions?