Merge pull request #2 from akash-akya/fix-forefox

Fix gain page rendering issue in Firefox
This commit is contained in:
Anantha Kumaran 2022-09-25 22:37:03 +05:30 committed by GitHub
commit df2c7a174f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -196,7 +196,7 @@ function renderOverview(gains: Gain[]) {
textGroup
.append("text")
.text((g) => formatCurrency(getInvestmentAmount(g)))
.attr("alignment-baseline", "hanging")
.attr("dominant-baseline", "hanging")
.attr("text-anchor", "end")
.style("fill", (g) =>
getInvestmentAmount(g) > 0 ? z("investment") : "none"
@ -209,7 +209,7 @@ function renderOverview(gains: Gain[]) {
textGroup
.append("text")
.text((g) => formatCurrency(getGainAmount(g)))
.attr("alignment-baseline", "hanging")
.attr("dominant-baseline", "hanging")
.attr("text-anchor", "end")
.style("fill", (g) =>
getGainAmount(g) > 0 ? chroma(z("gain")).darken().hex() : "none"
@ -265,7 +265,7 @@ function renderOverview(gains: Gain[]) {
.append("text")
.text((g) => formatFloat(g.xirr))
.attr("text-anchor", "end")
.attr("alignment-baseline", "middle")
.attr("dominant-baseline", "middle")
.style("fill", (g) =>
g.xirr < 0
? chroma(z("loss")).darken().hex()