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