fix:优化瀑布图配置

main
liu.shiyi 9 months ago
parent a4df428ac0
commit 80dbc6e90c

@ -39,12 +39,39 @@ const setting = [
}, },
/** 样式配置 **/ /** 样式配置 **/
// 图表 graph // 图表 graph
// {
// label: '柱子颜色',
// type: 'gradual', // 设置组件类型
// field: 'color', // 字段
// optionField: 'color', // 对应options中的字段
// value: 'l(90) 0:#6B74E4 1:#4391F4',
// tabName: 'custom',
// groupName: 'graph'
// },
{
label: '上涨色',
type: 'colorPicker', // 设置组件类型
field: 'risingFill', // 字段
optionField: 'risingFill', // 对应options中的字段
value: '#f4664a',
tabName: 'custom',
groupName: 'graph'
},
{
label: '下降色',
type: 'colorPicker', // 设置组件类型
field: 'fallingFill', // 字段
optionField: 'fallingFill', // 对应options中的字段
value: '#30bf78',
tabName: 'custom',
groupName: 'graph'
},
{ {
label: '柱子颜色', label: '总计色',
type: 'gradual', // 设置组件类型 type: 'colorPicker', // 设置组件类型
field: 'columnStyle_fill', // 字段 field: 'total_style_fill', // 字段
optionField: 'columnStyle.fill', // 对应options中的字段 optionField: 'total.style.fill', // 对应options中的字段
value: 'l(90) 0:#6B74E4 1:#4391F4', value: '#96a6a6',
tabName: 'custom', tabName: 'custom',
groupName: 'graph' groupName: 'graph'
}, },
@ -129,15 +156,6 @@ const setting = [
tabName: 'custom', tabName: 'custom',
groupName: 'graph' groupName: 'graph'
}, },
{
label: '柱背景颜色',
type: 'colorPicker',
field: 'columnBackground_style_fill',
optionField: 'columnBackground.style.fill',
value: 'rgba(255,255,255,0)',
tabName: 'custom',
groupName: 'graph'
},
// 网格线 grid // 网格线 grid
{ {
label: '虚线', label: '虚线',
@ -178,6 +196,15 @@ const setting = [
tabName: 'custom', tabName: 'custom',
groupName: 'xAxis' groupName: 'xAxis'
}, },
{
label: '总计标签',
type: 'input',
field: 'total_label',
optionField: 'total.label',
value: '',
tabName: 'custom',
groupName: 'yAxis'
},
{ {
label: '标题位置', label: '标题位置',
type: 'select', type: 'select',
@ -330,6 +357,7 @@ const setting = [
tabName: 'custom', tabName: 'custom',
groupName: 'yAxis' groupName: 'yAxis'
}, },
{ {
label: '标题过长时旋转', label: '标题过长时旋转',
type: 'switch', type: 'switch',
@ -471,16 +499,16 @@ const option = {
data, data,
xField: 'type', xField: 'type',
yField: 'money', yField: 'money',
color: '', // color: 'l(90) 0:#6B74E4 1:#4391F4',
columnStyle: { // 设置柱子渐变色 risingFill: '#f4664a',
fill: 'l(90) 0:#6B74E4 1:#4391F4' fallingFill: '#30bf78',
},
total: { total: {
label: '总支出', label: '总支出',
style: { style: {
fill: '#96a6a6' fill: '#96a6a6'
} }
}, },
label: { label: {
offsetY: 13, offsetY: 13,
// 可手动配置 label 数据标签位置 // 可手动配置 label 数据标签位置
@ -569,12 +597,6 @@ const option = {
} }
} }
}, },
// 背景图设置
columnBackground: {
style: {
fill: 'rgba(255,255,255,0)'
}
},
meta: { meta: {
type: { type: {
alias: '类别' alias: '类别'

Loading…
Cancel
Save