1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-27 17:19: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 = {
data: Object,
useLabels: Boolean,
useTooltip: Boolean
useTooltip: Boolean,
usePercentSign: Boolean
}
#d3SvgMemo = null
@ -359,7 +360,7 @@ export default class extends Controller {
stroke-width="1"></circle>
</svg>
${this.#tooltipValue(data)}
${this.#tooltipValue(data)}${this.usePercentSignValue ? "%" : ""}
</div>
${data.trend.value == 0 || data.trend.value.amount == 0 ? `