mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 主题hook图表相关字段错误
This commit is contained in:
parent
dcd9429c81
commit
1b5bf46bcb
@ -150,7 +150,7 @@ export default () => {
|
||||
if (el.fill) {
|
||||
themeColorValues.push({ area: area * 0.5, value: el.fill })
|
||||
}
|
||||
themeColorValues.push({ area: area * 0.5, value: el.themeColor[0] })
|
||||
themeColorValues.push({ area: area * 0.5, value: el.themeColors[0] })
|
||||
}
|
||||
else if (el.type === 'line') {
|
||||
themeColorValues.push({ area, value: el.color })
|
||||
@ -218,8 +218,8 @@ export default () => {
|
||||
const color = tinycolor(el.theme.color).toRgbString()
|
||||
if (!colors.includes(color)) colors.push(color)
|
||||
}
|
||||
if (el.type === 'chart' && el.fill && tinycolor(el.fill).getAlpha() !== 0) {
|
||||
const color = tinycolor(el.fill).toRgbString()
|
||||
if (el.type === 'chart' && el.themeColors[0] && tinycolor(el.themeColors[0]).getAlpha() !== 0) {
|
||||
const color = tinycolor(el.themeColors[0]).toRgbString()
|
||||
if (!colors.includes(color)) colors.push(color)
|
||||
}
|
||||
if (el.type === 'line' && tinycolor(el.color).getAlpha() !== 0) {
|
||||
@ -283,8 +283,8 @@ export default () => {
|
||||
}
|
||||
}
|
||||
if (el.type === 'chart') {
|
||||
el.themeColor = [colorMap[tinycolor(el.themeColor[0]).toRgbString()]] || el.themeColor
|
||||
el.gridColor = theme.fontColor
|
||||
el.themeColors = [colorMap[tinycolor(el.themeColors[0]).toRgbString()]] || el.themeColors
|
||||
el.textColor = theme.fontColor
|
||||
}
|
||||
if (el.type === 'line') el.color = colorMap[tinycolor(el.color).toRgbString()] || el.color
|
||||
if (el.type === 'audio') el.color = colorMap[tinycolor(el.color).toRgbString()] || el.color
|
||||
@ -357,8 +357,8 @@ export default () => {
|
||||
}
|
||||
}
|
||||
else if (el.type === 'chart') {
|
||||
el.themeColor = [themeColor]
|
||||
el.gridColor = fontColor
|
||||
el.themeColors = [themeColor]
|
||||
el.textColor = fontColor
|
||||
}
|
||||
else if (el.type === 'latex') el.color = fontColor
|
||||
else if (el.type === 'audio') el.color = themeColor
|
||||
|
@ -204,11 +204,10 @@ export const getChartOption = ({
|
||||
} : {},
|
||||
type: 'pie',
|
||||
radius: ['40%', '70%'],
|
||||
padAngle: 1,
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
borderRadius: 4,
|
||||
},
|
||||
emphasis: {
|
||||
label: {
|
||||
|
Loading…
x
Reference in New Issue
Block a user