forked from github/dataease
refactor(图表): 标签字体大小统一为12
This commit is contained in:
parent
314e65de51
commit
7867d0541d
@ -177,12 +177,7 @@ const changeLabelAttr = prop => {
|
|||||||
const init = () => {
|
const init = () => {
|
||||||
const chart = JSON.parse(JSON.stringify(props.chart))
|
const chart = JSON.parse(JSON.stringify(props.chart))
|
||||||
if (chart.customAttr) {
|
if (chart.customAttr) {
|
||||||
let customAttr = null
|
const customAttr = chart.customAttr
|
||||||
if (Object.prototype.toString.call(chart.customAttr) === '[object Object]') {
|
|
||||||
customAttr = JSON.parse(JSON.stringify(chart.customAttr))
|
|
||||||
} else {
|
|
||||||
customAttr = JSON.parse(chart.customAttr)
|
|
||||||
}
|
|
||||||
if (customAttr.label) {
|
if (customAttr.label) {
|
||||||
state.labelForm = defaultsDeep(customAttr.label, cloneDeep(COMPUTED_DEFAULT_LABEL.value))
|
state.labelForm = defaultsDeep(customAttr.label, cloneDeep(COMPUTED_DEFAULT_LABEL.value))
|
||||||
if (chartType.value === 'liquid' && state.labelForm.fontSize < fontSizeList.value[0].value) {
|
if (chartType.value === 'liquid' && state.labelForm.fontSize < fontSizeList.value[0].value) {
|
||||||
|
@ -277,7 +277,7 @@ export const DEFAULT_LABEL: ChartLabelAttr = {
|
|||||||
show: false,
|
show: false,
|
||||||
position: 'top',
|
position: 'top',
|
||||||
color: '#909399',
|
color: '#909399',
|
||||||
fontSize: 10,
|
fontSize: 12,
|
||||||
formatter: '',
|
formatter: '',
|
||||||
labelLine: {
|
labelLine: {
|
||||||
show: true
|
show: true
|
||||||
|
Loading…
Reference in New Issue
Block a user