Skip to content

Commit 6878120

Browse files
MarcBalabanmrblueblue
authored andcommitted
[number chart] fixed tspan on null issue (#73)
1 parent a3dabf9 commit 6878120

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/charts/number-chart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export default function numberChart (parent, chartGroup) {
4545
.attr("class", "number-chart-number")
4646
.style("color", _chart.getColor)
4747
.style("font-size", (d) => Math.max(Math.floor(_chart.height() / 5), 32) + "px")
48-
.text(selected === "-0" ? 0 : selected)
48+
.html(selected === "-0" ? 0 : selected)
4949
.style("font-size", function (d) {
5050
const width = d3.select(this).node().getBoundingClientRect().width
5151
let calcFontSize = parseInt(d3.select(this).node().style.fontSize.replace(/\D/g, ""))

0 commit comments

Comments
 (0)