@tekkare/auriga 0.1.142 → 0.1.143
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.json
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
class="oip_hybrid_chart__bar"
|
|
26
26
|
:style="{
|
|
27
27
|
background: barColor + '1a',
|
|
28
|
-
width: `${getPercentage(row.values[1]
|
|
28
|
+
width: `${getPercentage(row.values[1])}%`,
|
|
29
29
|
}"
|
|
30
30
|
></div>
|
|
31
31
|
<arg-tooltip
|
|
@@ -47,7 +47,9 @@
|
|
|
47
47
|
.format(val.value)
|
|
48
48
|
.replace(",", ".")
|
|
49
49
|
}}
|
|
50
|
-
<span
|
|
50
|
+
<span
|
|
51
|
+
class="oip_hybrid_chart__bar_percentage"
|
|
52
|
+
v-if="val.percentage"
|
|
51
53
|
>({{ val.percentage }} %)</span
|
|
52
54
|
>
|
|
53
55
|
</p>
|
|
@@ -165,14 +167,19 @@ export default defineComponent({
|
|
|
165
167
|
emit("showState", val);
|
|
166
168
|
}
|
|
167
169
|
function getPercentage(value) {
|
|
168
|
-
if (
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
if (value === maxValue.value) {
|
|
172
|
-
return 100;
|
|
170
|
+
if (value.percentage) {
|
|
171
|
+
if (maxValue.value === 100) {
|
|
172
|
+
return value.percentage;
|
|
173
173
|
} else {
|
|
174
|
-
|
|
174
|
+
if (value.percentage === maxValue.value) {
|
|
175
|
+
return 100;
|
|
176
|
+
} else {
|
|
177
|
+
return value.percentage * 100 / maxValue.value;
|
|
178
|
+
}
|
|
175
179
|
}
|
|
180
|
+
} else {
|
|
181
|
+
const all = props.contents.map((a) => a.values[1].value).reduce((acc, current) => acc + current, 0);
|
|
182
|
+
return value.value * 100 / all;
|
|
176
183
|
}
|
|
177
184
|
}
|
|
178
185
|
return {
|
|
@@ -20,7 +20,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
20
20
|
showAll: import("vue").Ref<boolean>;
|
|
21
21
|
getMaxValue: () => void;
|
|
22
22
|
changeShowState: (val: boolean) => void;
|
|
23
|
-
getPercentage: (value:
|
|
23
|
+
getPercentage: (value: any) => any;
|
|
24
24
|
tableBody: import("vue").ComputedRef<never[]>;
|
|
25
25
|
isEllipsisActive: (value: string) => boolean | undefined;
|
|
26
26
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "showState"[], "showState", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|