Hide unnecessary configurations for pie and dougnut charts

This commit is contained in:
Atanas Yonkov
2023-03-29 16:24:08 +03:00
parent 2d251472a0
commit d73c93f348
6 changed files with 12 additions and 6 deletions
+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 {