1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-31 02:59:39 +02:00

Support percentages

This commit is contained in:
Jose Farias 2024-04-21 11:38:20 -06:00
parent a54f67c624
commit 92b9b96885

View file

@ -6,7 +6,8 @@ export default class extends Controller {
static values = { static values = {
data: Object, data: Object,
useLabels: Boolean, useLabels: Boolean,
useTooltip: Boolean useTooltip: Boolean,
usePercentSign: Boolean
} }
#d3SvgMemo = null #d3SvgMemo = null
@ -359,7 +360,7 @@ export default class extends Controller {
stroke-width="1"></circle> stroke-width="1"></circle>
</svg> </svg>
${this.#tooltipValue(data)} ${this.#tooltipValue(data)}${this.usePercentSignValue ? "%" : ""}
</div> </div>
${data.trend.value == 0 || data.trend.value.amount == 0 ? ` ${data.trend.value == 0 || data.trend.value.amount == 0 ? `