cleanup
This commit is contained in:
parent
1ed4aaf1f7
commit
e19e32b8c0
|
@ -283,7 +283,6 @@ function renderCurrentExpensesBreakdown(
|
||||||
.attr("alignment-baseline", "middle")
|
.attr("alignment-baseline", "middle")
|
||||||
.attr("x", width + 125)
|
.attr("x", width + 125)
|
||||||
.attr("y", function (d) {
|
.attr("y", function (d) {
|
||||||
console.log(sprintf("|%7.2f|", (d.total / total) * 100));
|
|
||||||
return y(d.category) + y.bandwidth() / 2;
|
return y(d.category) + y.bandwidth() / 2;
|
||||||
})
|
})
|
||||||
.style("white-space", "pre")
|
.style("white-space", "pre")
|
||||||
|
|
|
@ -51,6 +51,7 @@ function renderOverview(points: Overview[], element: Element) {
|
||||||
const areaScale = d3.scaleOrdinal().domain(areaKeys).range(colors);
|
const areaScale = d3.scaleOrdinal().domain(areaKeys).range(colors);
|
||||||
|
|
||||||
const lineKeys = ["networth", "investment"];
|
const lineKeys = ["networth", "investment"];
|
||||||
|
const labels = ["Net Worth", "Net Investment"];
|
||||||
const lineScale = d3
|
const lineScale = d3
|
||||||
.scaleOrdinal<string>()
|
.scaleOrdinal<string>()
|
||||||
.domain(lineKeys)
|
.domain(lineKeys)
|
||||||
|
@ -203,7 +204,7 @@ function renderOverview(points: Overview[], element: Element) {
|
||||||
.labelOffset(22)
|
.labelOffset(22)
|
||||||
.shapeHeight(3)
|
.shapeHeight(3)
|
||||||
.shapeWidth(25)
|
.shapeWidth(25)
|
||||||
.labels(lineKeys)
|
.labels(labels)
|
||||||
.scale(lineScale);
|
.scale(lineScale);
|
||||||
|
|
||||||
svg.select(".legendLine").call(legendLine as any);
|
svg.select(".legendLine").call(legendLine as any);
|
||||||
|
|
Loading…
Reference in New Issue