Replacing the data in data.csv in example with your data should work. D3 will scale and plot the values on the graph by itself. If you want to change the x-scale and want to include time as well, you have to change the format specifier in the same line that you have mentioned from this line:
var parseDate = d3.time.format("%d-%b-%y").parse;
To this line:
var parseDate = d3.time.format("%m/%d/%Y-%H:%M:%S").parse;
I have added the sample for your code, check this out: line chart with date and time.
- Simple D3.js line chart with data that are values collect every hours
- d3js - How to update an existing svg path in a simple d3 line chart with new data flowing through?
- nvd3 line chart with string values on x-axis
- NVD3 line chart with realtime data
- nvd3.js-Line Chart with View Finder: rotate axis labels and show line values when mouse over
- Draw D3 Simple Line chart With an Array
- 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
- d3js stack chart with simple data
- Align lines and dots with x-axis values in line chart
- 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
- simple multi line chart with D3
- D3 : non continuous line chart with null values inside an object
- Draw Line chart with positive & negative values
- Updating D3 column chart with different values and different data sizes
- How do you get JSON data and create a line chart with d3.js?
- Values are not reflecting Dynamically in D3 Bar Chart using. Overlapping occur with the existing Graph.
- Angular NVD3 Multibar Chart with dual y-axis to showup only line using json data
- D3 Area chart that tends to zero where values are missing
- 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
- Generating a simple bar chart with d3.js and an array of form data
- D3 Multi Series Line chart not working with correct xAxis values
- D3.js line chart with negative values
- Uncaught TypeError: Cannot read property 'length' of undefined in line chart with json data
- D3 single line chart with tsv data
- Show values on Y Axis as it is with Higher and lower limits NVD3 Line Chart
- D3.JS how to load 3 csv files and change data on line chart with button click event?
- How can i group elements that are bound to different data (to be used with forcesimulatoin) in D3 so that I can sort them
More Query from same tag
- Why is d appearing as undefined in my d3 script?
- Grails error loading big csv file with d3.js
- Bar chart with negative values
- Flask - temp CSV to be read by D3 empty
- Maintaining data positions when zooming in d3
- Cannot push values into an array
- Programmatic access of data in d3.js v6 collapsible tree via selectors
- Simple d3 bar graph doesn't show up
- AngularJS, D3 and JQuery in the same page. D3 can't read the correct DOM dimensions
- How do you access an array of Objects using D3?
- Group data by calendar month
- D3.js Enter, Update, Exit issue
- Creating SVG elements without rendering them
- C3 - How to center text in donut chart?
- How to create a beeswarm plot with variable radius in d3js v5?
- Drawing path from 2 dataset
- D3.js not defined, express serving up static files
- Comparison of D3 and Dojo GFX
- How to get absolute coordinates of object inside a <g> group?
- Using Dagre-D3 with Meteor
- How do I shut down a python simpleHTTPserver?
- How to fill number of rectangles in a row corresponding to the numbers in an array. d3.js
- How to update d3-force elements?
- D3 auto updates when array length change
- d3 Path from 2D coordinates
- Unable to properly remove a D3 element