Commit 58be175b authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

added title

parent ca4c8c02
......@@ -11,6 +11,12 @@ export default class extends Chart {
.attr('class', 'ac-box-svg ada-chart')
.append('g');
this.title = this.svg
.append('text')
.attr('text-anchor', 'middle')
.style('dominant-baseline', 'central')
.attr('class', 'ac-bar-title');
this.axisBottom = this.svg
.append('g')
.attr('class', 'ac-bar-bottom-axis ac-bar-axis');
......@@ -65,6 +71,10 @@ export default class extends Chart {
this.svg.attr('transform', `translate(${margin.left}, ${margin.top})`);
this.title
.attr('transform', `translate(${width / 2}, ${-margin.top / 2})`)
.text(title);
const x = d3.scaleBand()
.domain(categories)
.range([0, width])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment