Currently working on a stacked bar chart with a line chart on dual axis using D3.js and facing difficulty aligning labels correctly.
Check out the code I have experimented with so far: https://plnkr.co/edit/doobXBC5hgzvGwDLvArF?p=preview
I am looking to vertically position the labels inside the middle of each stack, as well as place labels above the line for each tick. I'm very new to D3.js and unsure about the functions/styles needed here. Any guidance would be greatly appreciated!
Here's a snippet of the JavaScript code:
var margin = {top: 20, right: 20, bottom: 30, left: 40},
width = 660 - margin.left - margin.right,
height = 400 - margin.top - margin.bottom;
// More code...