Dual axes line-bar chart
This D3.js v4 example shows a dual-axis line-bar chart comparing two line series with a bar series across five yearly data points. The visualization combines steelblue and crimson lines, overlaid with labeled circles on each point, alongside gray bars on a shared x-axis. The code uses `d3.scaleBand` and `d3.scalePoint` for the x-positions, `d3.scaleLinear` for the separate left and right y-axes, and `d3.axisLeft` and `d3.axisRight` to render them. Data is loaded from a local CSV file and rendered as SVG elements.
AI-generated descriptionThis is a multiple line graph demonstrating the display of seperate colour coded y axes for each line. This was written using d3.js v4 and is a follow on to the multiple line graph example here.
This graph is part of the code samples for the update to the book D3 Tips and Tricks to version 4 of d3.js.
forked from <a href='http://bl.ocks.org/d3noob/'>d3noob</a>'s block: <a href='http://bl.ocks.org/d3noob/814a2bcb3e7d8d8db74f36f77c8e6b7f'>Dual axes in v4</a>