mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
FIX: Percentage Text is cutoff (this removes transition as well)
This commit is contained in:
parent
472fd75092
commit
0b7140504e
1 changed files with 40 additions and 45 deletions
|
@ -130,8 +130,7 @@ export function renderButtons(
|
||||||
.domain(["learning", "young", "mature"])
|
.domain(["learning", "young", "mature"])
|
||||||
.range([bounds.marginLeft, bounds.width - bounds.marginRight]);
|
.range([bounds.marginLeft, bounds.width - bounds.marginRight]);
|
||||||
svg.select<SVGGElement>(".x-ticks")
|
svg.select<SVGGElement>(".x-ticks")
|
||||||
.call((selection) =>
|
.call(
|
||||||
selection.transition(trans).call(
|
|
||||||
axisBottom(xGroup)
|
axisBottom(xGroup)
|
||||||
.tickFormat(
|
.tickFormat(
|
||||||
((d: GroupKind) => {
|
((d: GroupKind) => {
|
||||||
|
@ -153,11 +152,8 @@ export function renderButtons(
|
||||||
)
|
)
|
||||||
.tickSizeOuter(0),
|
.tickSizeOuter(0),
|
||||||
)
|
)
|
||||||
)
|
|
||||||
.attr("direction", "ltr");
|
.attr("direction", "ltr");
|
||||||
|
|
||||||
// Add a timeout to ensure that the text elements are populated
|
|
||||||
setTimeout(() => {
|
|
||||||
svg.select<SVGGElement>(".x-ticks").selectAll<SVGTextElement, GroupKind>("text")
|
svg.select<SVGGElement>(".x-ticks").selectAll<SVGTextElement, GroupKind>("text")
|
||||||
.each(function(this: SVGTextElement, d: GroupKind) {
|
.each(function(this: SVGTextElement, d: GroupKind) {
|
||||||
if (!(this instanceof SVGElement)) {
|
if (!(this instanceof SVGElement)) {
|
||||||
|
@ -181,7 +177,6 @@ export function renderButtons(
|
||||||
this.appendChild(tspan);
|
this.appendChild(tspan);
|
||||||
this.appendChild(tspan2);
|
this.appendChild(tspan2);
|
||||||
});
|
});
|
||||||
}, 0);
|
|
||||||
|
|
||||||
const xButton = scaleBand()
|
const xButton = scaleBand()
|
||||||
.domain(["1", "2", "3", "4"])
|
.domain(["1", "2", "3", "4"])
|
||||||
|
|
Loading…
Reference in a new issue