3
0

Hide unnecessary configurations for pie and dougnut charts

This commit is contained in:
Atanas Yonkov
2023-03-28 10:50:35 +03:00
parent 2d251472a0
commit d73c93f348
6 changed files with 12 additions and 6 deletions
@@ -115,6 +115,7 @@
<template #metric-options="{ metric }">
<b-form-group
v-if="!['pie', 'doughnut'].includes(metric.type)"
horizontal
:label-cols="3"
class="mt-1"
@@ -150,6 +150,7 @@
<b-input
v-model="d.rotateLabel"
type="number"
number
/>
</b-form-group>
</template>
+2 -2
View File
@@ -313,7 +313,7 @@ export class BaseChart {
return Object.assign({}, {
conditions: {},
meta: {},
rotateLabel: '0',
rotateLabel: 0,
})
}
@@ -331,7 +331,7 @@ export class BaseChart {
axisType: 'linear',
axisPosition: 'left',
labelPosition: 'end',
rotateLabel: '0',
rotateLabel: 0,
},
tooltip: {},
legend: {
+5 -1
View File
@@ -121,15 +121,19 @@ export default class Chart extends BaseChart {
options.tooltip.trigger = 'item'
let lbl = {}
let lbl:any = {
rotate: dimension.rotateLabel ? +dimension.rotateLabel: 0
}
if (t?.labelsNextToPartition) {
lbl = {
...lbl,
show: true,
overflow: 'truncate',
}
} else {
lbl = {
...lbl,
show: fixed,
position: 'inside',
align: 'center',
+2 -2
View File
@@ -30,7 +30,7 @@ export interface Dimension {
default?: string;
skipMissing?: boolean;
autoSkip?: boolean;
rotateLabel?: string;
rotateLabel?: number;
}
export interface Metric {
@@ -56,7 +56,7 @@ export interface YAxis {
labelPosition?: string;
min?: string;
max?: string;
rotateLabel?: string;
rotateLabel?: number;
}
export interface ChartOffset {
+1 -1
View File
@@ -42,7 +42,7 @@ edit:
noItemsFound: No options found
rotate:
label: Rotate label
description: Labels can be rotated from -90 to 90 degrees. Applied to bar and line charts
description: Labels can be rotated from -90 to 90 degrees.
filter:
customize: Customize filter
label: Filters