accChart = {
const svg = d3
.create('svg')
.attr('width', config.chartAccWidth)
.attr('height', config.chartAccHeight);
const stage = svg
.append('g')
.attr(
...ttrans(config.chartAccMarginHorizontal, config.chartAccMarginVertical)
);
const axisX = svg
.append('g')
.attr(
...ttrans(
config.chartAccMarginHorizontal,
config.chartAccHeightClipped + config.chartAccMarginVertical
)
)
.call(chartAccAxisX);
const axisY = svg
.append('g')
.attr(
...ttrans(config.chartAccMarginHorizontal, config.chartAccMarginVertical)
)
.call(chartAccAxisY);
function render(_targetTime) {
stage
.selectAll('.bar')
.data(totalData, d => d.date)
.join(enterAccBar, updateAccBar(_targetTime));
}
return Object.assign(svg.node(), { render });
}