Hide unnecessary configurations for pie and dougnut charts
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user