Commit 60d9586a authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

text placement fix

parent 09706526
......@@ -54,8 +54,8 @@
}
}
if (Math.random() > 0.8) shuffle(rows);
if (Math.random() > 0.8) shuffle(cols);
if (Math.random() > 0.7) shuffle(rows);
if (Math.random() > 0.7) shuffle(cols);
}
/**
......
......@@ -155,6 +155,7 @@ export default class extends Chart {
.append('text')
.attr('class', 'ac-row-label')
.style('text-anchor', 'end')
.style('dominant-baseline', 'middle')
.style('transform', d => `translate(-5px, ${this.yScale(d) + 0.5 * this.yScale.bandwidth()}px)`)
.text(d => d)
.on('click', (row) => {
......@@ -186,6 +187,7 @@ export default class extends Chart {
.append('text')
.attr('class', 'ac-col-label')
.style('text-anchor', 'end')
.style('dominant-baseline', 'middle')
.style('transform', d => `translate(${this.xScale(d) + 0.5 * this.xScale.bandwidth()}px, -5px)rotate(45deg)`)
.text(d => d)
.on('click', (col) => {
......
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