hide percent for outflows/inflows by account categorical chart
This commit is contained in:
@@ -142,9 +142,11 @@ const chartOptions = computed<object>(() => {
|
||||
tooltip += `<div class="d-inline-flex">${name}</div><br/>`;
|
||||
}
|
||||
|
||||
if (props.showValue) {
|
||||
if (props.showValue && props.showPercent) {
|
||||
tooltip += `<div class="d-inline-flex"><span>${value}</span><span class="ms-1">(${percent})</span></div>`;
|
||||
} else {
|
||||
} else if (props.showValue && !props.showPercent) {
|
||||
tooltip += `<div class="d-inline-flex">${value}</div>`;
|
||||
} else if (!props.showValue && props.showPercent) {
|
||||
tooltip += `<div class="d-inline-flex">${percent}</div>`;
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ const props = defineProps<{
|
||||
minValidPercent?: number;
|
||||
defaultCurrency?: string;
|
||||
showValue?: boolean;
|
||||
showPercent?: boolean;
|
||||
}>();
|
||||
|
||||
const theme = useTheme();
|
||||
@@ -92,11 +93,15 @@ const radarData = computed<RadarChartData>(() => {
|
||||
|
||||
tooltip += '<div><span class="chart-pointer" style="background-color: ' + color + '"></span>';
|
||||
tooltip += `<span>${name}</span>`;
|
||||
if (props.showValue) {
|
||||
|
||||
if (props.showValue && props.showPercent) {
|
||||
tooltip += `<span class="ms-1" style="float: inline-end">(${displayPercent})</span><span class="ms-5" style="float: inline-end">${displayValue}</span>`;
|
||||
} else {
|
||||
} else if (props.showValue && !props.showPercent) {
|
||||
tooltip += `<span class="ms-5" style="float: inline-end">${displayValue}</span>`;
|
||||
} else if (!props.showValue && props.showPercent) {
|
||||
tooltip += `<span class="ms-5" style="float: inline-end">${displayPercent}</span>`;
|
||||
}
|
||||
|
||||
tooltip += '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user