score:1
Accepted answer
you set the domain at the beginning of the d3.json
function using d.cases
as your y
variable, but when you set height, you use d.deaths.
your y
function is set up to use the cases
number as it's scale, so you need to pick one, i think.
Source: stackoverflow.com
Related Query
- Why is my y-axis not shown accordingly to the data?
- Data points and ticks in the scaleBand axis are not aligned
- Why animated d3 svg line is not synchronized with the axis shift in IE9 but synchronized in IE11 and Chrome?
- D3: The data on the axis not mapping
- Why axis labels are not removed from the DOM in d3?
- d3 js axis does not match the actual data
- d3js: scatterplot zoom. Only axis is zooming not the data
- Why is the histogram not displaying if I read the data from a mysql database
- Why my tooltip is not shown if I can see it in the source?
- Why is the first element in my d3 data not being updated?
- Looping through data attributes to create 4 separate bar charts... why are there "phantom" data elements being bound to the xAxis?
- Display only values from the data set into X axis ticks
- Why is my call to selection.join() not returning the enter selection?
- Why are my images not showing up in the nodes of this D3 chart?
- Visualization data inserted in the webpage is not properly indented and not appearing at desired position
- Why are the labels on my D3 axis inconsistent (e.g. month, day)?
- Why is D3.js data only available to child nodes when enter() is chained, not invoked separately
- Why d3.domain() has only one element when I use the whole data array as domain?
- D3.js V5 - Why is my bar chart axis not scaling?
- Why isn't my text displaying in the svg axis label? (D3 Margin Convention)
- the data is changed, but reloading does not fetch new data, D3
- D3.js version3 scale.ordinal() not reading in my data the way I would like
- Chart is not showing the data array of objects
- d3 v4 why are there duplicate ticks on the X Axis (how to work tickValues)?
- d3.js data not refreshing upon change in the file
- In d3.js ticks are not showing in the x axis
- Load and display data with condition, but the condition is not met
- Axis is not displaying the first element in the domain
- Why does this code work for counting one item in a list but not the others?
- D3 zoom only affect in axis and not in data
More Query from same tag
- How to draw a vertical line with dimple?
- Pagination of legends
- Problem with d3.js transitions - incorrect polygon morphing using GeoJson
- Is it possible to find the distance between ticks in D3.js?
- Is there an "axis equal" in D3?
- react-d3 using dates as the x axis
- can you add filterHandler for composite chart, dc.js?
- D3 updating data but not axis
- D3 Part of Dashboard not Displayed
- How do you make an SVG element mouse event bubble up through another element?
- Resize Line Graph in D3 based on Window size
- html page works when local but not when on cloud ide
- d3 importing data from mysql database return "undefined"
- tree.nodeSize in d3 v4
- How to disable pan for d3.behavior.zoom?
- limit a voronoi diagram within country border in d3.js
- Why selectAll("element") is important in d3js while generating a chart
- Formatting issue in D3
- Adding color to Voronoi Seeds based on condition from data
- How to arrange dates in a drop-down list according their natural way using D3.js
- 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
- Tooltip skidding in NVD3 line chart
- d3.js - adding One additional tick for the Y axis does not work
- d3.js change zoom behavior to semantic zoom
- d3 pie chart transition with attrtween
- d3 line graphic, get data from Object instead of CSV
- Appended text is not updated according to CSV file changes
- Customize the d3 month or year tick format
- JS D3 Update force Graph with Websocket
- Eliminate decimal strings displaying in HTML tables (via poshytip mouseover)