score:1
Accepted answer
Here you have a MWE of the fixed chart: https://jsfiddle.net/26kqjwsb/
Some things to take into account.
You are using
total_up_percentage
in the y domain definition:y.domain([0, d3.max(data, function (d) { return Math.max(d.total_up_percentage); })]);
But the field name should be
total_hour_percentage
.Your y values are between 99.55 and 100. If the y axis is between 0 and 100, you'll see only a plain line.
D3js by default generates filled paths, so you must set your path
fill
andstroke
properties to plot a line chart.The dates in the x-axis are the expected according to your dataset.
Source: stackoverflow.com
Related Query
- 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
- How to put data on line chart when x axis and data has a time range
- Real time data graphing on a line chart with the help of rickshaw and d3.js
- nvd3.js-Line Chart with View Finder: rotate axis labels and show line values when mouse over
- Create a padding for the first and last data points using a time scale
- 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
- How to normalize data in d3 and plot the lines in the axis independent of other line ranges
- Show values on Y Axis as it is with Higher and lower limits NVD3 Line Chart
- d3 chart is showing some decimal value in the X axis tick, instead of showing the date and time
- line graph renders wrongly and problem with the X axis (time), cannot brush the graph - time series dc.js
- How to rotate the text labels for the x Axis of a nvd3.js line chart
- How to change color only for data grid or x and y axis in chart in D3.js
- D3 line chart and adding data points real time
- Adding Data Label and Marker to the Line chart using d3
- In d3, how do I apply a style to my line chart for both the line and the area under the line?
- How to draw a Bar Chart with time on xAxis and one or more numeric data for yAxis in d3js?
- MultiBar chart with nvd3 / d3 only shows labels for every other tick on the x-axis. How can I get them all to show up?
- Data points and ticks in the scaleBand axis are not aligned
- How to plot animated line chart using d3 while the data table is required to be updated every 1 second?
- Date and time transition from data with line
- Error in A Simple D3 Line chart with Legend and Tooltips for D3v 3.5.13
- How to modify axis labels in d3 for a stacked bar chart when the axis labels are mapped as part of the scale's domain
- How to create Stacked Line Chart D3, Multiple Y Axis and common X Axis
- d3 show labels only for ticks with data in a bar chart
- D3 hide overflow of the chart area, when Y axis has a min and max
- Specifying Ticks on D3 Bar chart with Time Series data and scaleBand
- C3js - combination chart with data labels only for line
- d3v4 checkout chart - making sure the color scheme is correct for the legend and circles
- D3.js: plot dots on the existing line in a multiseries line chart with long formatted data
More Query from same tag
- add data and redraw D3 chord layout
- Links are directed to top left corner in forceNetwork with networkD3 in R
- How to use d3.js with JSRender?
- when creating another instance of an infinite animation, it disappears
- Rails won't render json data on leaflet with d3
- How to draw a simple bar chart where each bar is of different color?
- LINKS IN Collapsible Tree in D3.js
- Define JSON Data Attributes to use in Tooltip (Tooltip Shows "Undefined")
- How do I create a border with gradiant opacity in CSS ?
- What is the original radius function for circle pack?
- D3JS wrap text plugin overwritten after updating the data
- Cannot draw multiple lines
- D3 chart error bars other than stroke type
- Zoom for graph in D3
- Ho do I capture ctrl + click on MacOS with d3js
- Sorting method in d3js not working
- Save D3 svg as a high quality image - viewport case
- Show labels conditionally on multi series line chart
- d3.select versus document.getElementById
- Getting a csv file from local directory to make a Chart without using server
- D3 Adding hyperlinks to objects?
- charts not renderring in django-nvd3
- Javascript comparing dates - bug in d3.js chart
- How is D3 computing the displayed date values on this chart?
- Save svg to disk as png image - browser discrepancy
- D3.js bar charts not refreshing
- reading in CSV with D3 js
- D3JS: Multi-Nested JSON data
- Is d3.mouse( mySVG[0][0]) really the right way to address the container?
- How can I wrap text on the each arc in D3.js?