mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-30 02:29:39 +02:00
Fix empty state in time series chart
This commit is contained in:
parent
406e294dac
commit
3f946c7968
1 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ export default class extends Controller {
|
||||||
|
|
||||||
|
|
||||||
#draw() {
|
#draw() {
|
||||||
if (this.#dataPoints.length < 2) {
|
if (this.#dataPoints.length == 0) {
|
||||||
this.#drawEmpty()
|
this.#drawEmpty()
|
||||||
} else if (this.#isFullChart) {
|
} else if (this.#isFullChart) {
|
||||||
this.#drawFullChart()
|
this.#drawFullChart()
|
||||||
|
@ -86,7 +86,7 @@ export default class extends Controller {
|
||||||
.attr("x1", this.#d3InitialContainerWidth / 2)
|
.attr("x1", this.#d3InitialContainerWidth / 2)
|
||||||
.attr("y1", 0)
|
.attr("y1", 0)
|
||||||
.attr("x2", this.#d3InitialContainerWidth / 2)
|
.attr("x2", this.#d3InitialContainerWidth / 2)
|
||||||
.attr("y2", this.d3InitialContainerHeight)
|
.attr("y2", this.#d3InitialContainerHeight)
|
||||||
.attr("stroke", tailwindColors.gray[300])
|
.attr("stroke", tailwindColors.gray[300])
|
||||||
.attr("stroke-dasharray", "4, 4")
|
.attr("stroke-dasharray", "4, 4")
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ export default class extends Controller {
|
||||||
this.#d3MainSvg
|
this.#d3MainSvg
|
||||||
.append("circle")
|
.append("circle")
|
||||||
.attr("cx", this.#d3InitialContainerWidth / 2)
|
.attr("cx", this.#d3InitialContainerWidth / 2)
|
||||||
.attr("cy", this.d3InitialContainerHeight / 2)
|
.attr("cy", this.#d3InitialContainerHeight / 2)
|
||||||
.attr("r", 4)
|
.attr("r", 4)
|
||||||
.style("fill", tailwindColors.gray[400])
|
.style("fill", tailwindColors.gray[400])
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue