| | |
| | | }]) |
| | | } |
| | | |
| | | let _label = card.label || 'false' |
| | | |
| | | return [ |
| | | { |
| | | type: 'radio', |
| | |
| | | type: labelOptions.length > 20 ? 'select' : 'radio', |
| | | key: 'label', |
| | | label: '标注', |
| | | initVal: card.label || 'false', |
| | | initVal: _label, |
| | | tooltip: '图形节点处的数值。', |
| | | required: false, |
| | | options: labelOptions |
| | |
| | | initVal: card.labelColor || 'system', |
| | | tooltip: '使用系统色时,使用色系选项设置的系统颜色,使用自定义为颜色设置中定义的图形颜色。', |
| | | required: false, |
| | | hidden: _label !== 'true', |
| | | options: [{ |
| | | value: 'system', |
| | | text: '系统' |
| | |
| | | value: 'custom', |
| | | text: '自定义' |
| | | }] |
| | | // }, { |
| | | // type: 'radio', |
| | | // key: 'offset', |
| | | // label: '标注位置', |
| | | // initVal: card.offset || 'outer', |
| | | // required: false, |
| | | // options: [{ |
| | | // value: 'outer', |
| | | // text: '外部' |
| | | // }, { |
| | | // value: 'inner', |
| | | // text: '内部' |
| | | // }], |
| | | // forbid: card.chartType !== 'bar' |
| | | }, { |
| | | type: 'radio', |
| | | key: 'labelValue', |
| | | label: '标注值', |
| | | initVal: card.labelValue || 'default', |
| | | tooltip: '标注值的显示规则。', |
| | | required: false, |
| | | hidden: _label === 'false', |
| | | options: [{ |
| | | value: 'default', |
| | | text: '默认' |
| | | }, { |
| | | value: 'zero', |
| | | text: '隐藏 0 值' |
| | | }], |
| | | }, { |
| | | type: 'radio', |
| | | key: 'adjust', |
| | |
| | | if (key === 'datatype') { |
| | | this.setState({ |
| | | datatype: val, |
| | | formlist: formlist.map(item => { |
| | | formlist: fromJS(formlist).toJS().map(item => { |
| | | if (['Yaxis'].includes(item.key)) { |
| | | item.hidden = val === 'statistics' |
| | | } else if (['InfoType', 'InfoValue'].includes(item.key)) { |
| | |
| | | return item |
| | | }) |
| | | }) |
| | | } else if (key === 'label') { |
| | | this.setState({formlist: fromJS(formlist).toJS().map(cell => { |
| | | if (!['labelColor', 'labelValue'].includes(cell.key)) return cell |
| | | |
| | | if (cell.key === 'labelColor') { |
| | | if (val !== 'true') { |
| | | cell.hidden = true |
| | | } else { |
| | | cell.hidden = false |
| | | } |
| | | } else { |
| | | if (val === 'false') { |
| | | cell.hidden = true |
| | | } else { |
| | | cell.hidden = false |
| | | } |
| | | } |
| | | |
| | | return cell |
| | | })}) |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | type: 'radio', |
| | | key: 'label', |
| | | label: '标签', |
| | | label: '标注', |
| | | initVal: card.label || 'false', |
| | | required: false, |
| | | options: [{ |
| | |
| | | } |
| | | if (plot.label !== 'false') { |
| | | _chart.label(_valfield, (value) => { |
| | | if (plot.labelValue === 'zero' && value === 0) { |
| | | return null |
| | | } |
| | | if (plot.show === 'percent') { |
| | | value = value + '%' |
| | | } |
| | |
| | | } |
| | | if (plot.label !== 'false') { |
| | | _chart.label('value*key', (value, key) => { |
| | | if (plot.labelValue === 'zero' && value === 0) { |
| | | return null |
| | | } |
| | | |
| | | if (plot.show === 'percent') { |
| | | value = value + '%' |
| | | } |
| | |
| | | } |
| | | if (plot.label !== 'false') { |
| | | _chart.label('value*key', (value, key) => { |
| | | if (plot.labelValue === 'zero' && value === 0) { |
| | | return null |
| | | } |
| | | |
| | | if (plot.show === 'percent') { |
| | | value = value + '%' |
| | | } |
| | |
| | | } |
| | | if (item.label !== 'false') { |
| | | _chart.label(item.name, (value) => { |
| | | if (plot.labelValue === 'zero' && value === 0) { |
| | | return null |
| | | } |
| | | |
| | | if (item.show === 'percent') { |
| | | value = value + '%' |
| | | } |
| | |
| | | |
| | | if (item.label === 'true') { |
| | | _chart.label(item.name, (value) => { |
| | | if (plot.labelValue === 'zero' && value === 0) { |
| | | return null |
| | | } |
| | | |
| | | if (item.show === 'percent') { |
| | | value = value + '%' |
| | | } |
| | |
| | | } |
| | | if (plot.label !== 'false') { |
| | | _chart.label(`${_valfield}*${_typefield}`, (value, key) => { |
| | | if (plot.labelValue === 'zero' && value === 0) { |
| | | return null |
| | | } |
| | | |
| | | if (plot.show === 'percent') { |
| | | value = value + '%' |
| | | } |
| | |
| | | } |
| | | if (plot.label !== 'false') { |
| | | _chart.label(`${_valfield}*${_typefield}`, (value, key) => { |
| | | if (plot.labelValue === 'zero' && value === 0) { |
| | | return null |
| | | } |
| | | |
| | | if (plot.show === 'percent') { |
| | | value = value + '%' |
| | | } |
| | |
| | | .mk-disabled { |
| | | color: #bcbcbc; |
| | | cursor: not-allowed; |
| | | --mk-table-color: #bcbcbc; |
| | | |
| | | .ant-btn { |
| | | cursor: not-allowed; |
| | | } |
| | |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | |
| | | >span, div:not(.card-cell-list), div:not(.card-cell-list) div, div:not(.card-cell-list) span { |
| | | >span, >div:not(.card-cell-list) div, >div:not(.card-cell-list) span { |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | } |
| | |
| | | font-size: var(--mk-table-font-size)!important; |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | |
| | | >span, div:not(.card-cell-list), div:not(.card-cell-list) div, div:not(.card-cell-list) span { |
| | | >span, >div:not(.card-cell-list) div, >div:not(.card-cell-list) span { |
| | | font-weight: var(--mk-table-font-weight)!important; |
| | | } |
| | | } |
| | |
| | | ] |
| | | |
| | | // 图表色系 |
| | | export const chartColors = ['rgb(91, 143, 249)', 'rgb(90, 216, 166)', 'rgb(93, 112, 146)', 'rgb(246, 189, 22)', 'rgb(232, 100, 82)', 'rgb(109, 200, 236)', 'rgb(148, 95, 185)', 'rgb(246, 189, 22)', 'rgb(205, 221, 253)', 'rgb(248, 208, 203)'] |
| | | export const chartColors = ['rgb(91, 143, 249)', 'rgb(90, 216, 166)', 'rgb(93, 112, 146)', 'rgb(246, 189, 22)', 'rgb(232, 100, 82)', 'rgb(109, 200, 236)', 'rgb(148, 95, 185)', 'rgb(205, 221, 253)', 'rgb(248, 208, 203)', 'rgb(145, 213, 255)', 'rgb(211, 173, 247)'] |
| | | |
| | | // 日期默认值选择范围 |
| | | export const dateOptions = { |