chart = {
let r = 10,
spacing = 20;
const svg = d3
.create("svg")
.attr('width', width)
.attr('height', height);
svg
.append('rect')
.attr('width', width)
.attr('height', height + 20)
.style('fill', '#121212');
let allContainer = svg.append('g').attr('transform', 'translate(30, 20)');
let yAxis = svg
.append("g")
.attr('id', 'y-axis')
.call(yAxisGenerator)
.call(g => g.select(".domain").remove());
yAxis.selectAll('text').style('fill', d => {
return '#aaa';
});
svg.selectAll('.tick line, .domain').style('stroke', '#444');
svg
.append('path')
.datum(glucoseData)
.attr('d', line)
.style('fill', 'none')
.style('stroke', '#fff')
.style('stroke-width', '2px');
return svg.node();
}