chart_time = {
replay;
const svg = d3.create("svg")
.attr("viewBox", [0, 0, width, height]);
const updateBars = bars(svg);
const updateAxis = axis(svg);
const updateLabels = labels(svg);
const updateTicker = ticker(svg);
const updateProjects = projects(svg);
const axisG = svg.append("g")
.attr("transform", "translate(0,10)")
.call(d3.axisBottom(scale)
.tickFormat(d => d <= d3.timeYear(d) ? d.getFullYear() : null));
axisG.selectAll(".tick")
.append("circle")
.attr("class", "tickcircle")
.attr("fill", "grey")
.attr("stroke", "none")
.attr("r", 5);
yield svg.node();
for (const keyframe of keyframes) {
const transition = svg.transition()
.duration(duration)
.delay(delay_amount)
.ease(d3.easeLinear);
x.domain([0, keyframe[1][0].value]);
axisG.selectAll(".tickcircle").on("click", function(event){
mutable year_select = event.path[1].__data__;
console.log(d3.select(this).node())
d3.select(".selected").classed("selected", false);
d3.select(this).classed("selected", true);
d3.select(this).attr("fill", "blue");
})
updateAxis(keyframe, transition);
updateBars(keyframe, transition);
updateLabels(keyframe, transition);
updateTicker(keyframe, transition);
updateProjects(keyframe, transition);
invalidation.then(() => svg.interrupt());
await transition.end();
}
}