Merge pull request #7475 from dataease/pr@dev@fix_chart_table
Pr@dev@fix chart table
This commit is contained in:
commit
685060866e
@ -1045,7 +1045,10 @@ export default {
|
||||
tableChart.customAttr.color.tableHeaderFontColor = '#7c7e81'
|
||||
tableChart.customAttr.color.tableFontColor = '#7c7e81'
|
||||
tableChart.customAttr.color.enableTableCrossBG = false
|
||||
tableChart.customAttr.size.showTableHeader = true
|
||||
}
|
||||
tableChart.customAttr.size.tableColumnFreezeHead = 0
|
||||
tableChart.customAttr.size.tableRowFreezeHead = 0
|
||||
tableChart.customAttr.color.tableStripe = true
|
||||
tableChart.customAttr.size.tablePageMode = 'pull'
|
||||
tableChart.customStyle.text.show = false
|
||||
|
||||
@ -576,7 +576,12 @@ function getConditions(chart) {
|
||||
if (customAttr.color) {
|
||||
const c = JSON.parse(JSON.stringify(customAttr.color))
|
||||
valueColor = c.tableFontColor
|
||||
valueBgColor = hexColorToRGBA(c.tableItemBgColor, c.alpha)
|
||||
const enableTableCrossBG = c.enableTableCrossBG
|
||||
if (!enableTableCrossBG) {
|
||||
valueBgColor = hexColorToRGBA(c.tableItemBgColor, c.alpha)
|
||||
} else {
|
||||
valueBgColor = null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -594,9 +599,12 @@ function getConditions(chart) {
|
||||
res.background.push({
|
||||
field: field.field.dataeaseName,
|
||||
mapping(value, rowData) {
|
||||
return {
|
||||
fill: mappingColor(value, valueBgColor, field, 'backgroundColor', filedValueMap, rowData)
|
||||
const fill = mappingColor(value, valueBgColor, field, 'backgroundColor', filedValueMap, rowData)
|
||||
if (fill) {
|
||||
return { fill }
|
||||
}
|
||||
// 返回 null 会使用主题中的背景色
|
||||
return null
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user