| | |
| | | initVal: card.max, |
| | | required: false |
| | | }, { |
| | | type: 'number', |
| | | key: 'XLimit', |
| | | min: 2, |
| | | label: '字符限制', |
| | | tooltip: 'X轴最大字符限制。', |
| | | initVal: card.XLimit || 11, |
| | | forbid: appType === 'mob', |
| | | required: false |
| | | }, { |
| | | type: 'color', |
| | | key: 'color', |
| | | label: '色系', |
| | |
| | | _config.plot.$colors = colors |
| | | } |
| | | |
| | | let limit = _config.plot.XLimit || 11 |
| | | |
| | | let xc = {label: { |
| | | formatter: (val) => { |
| | | if (!val || /^\s*$/.test(val)) return val |
| | | let _val = `${val}` |
| | | if (_val.length <= 11) return val |
| | | return _val.substring(0, 8) + '...' |
| | | if (_val.length <= limit) return val |
| | | return _val.substring(0, limit) + '...' |
| | | }, |
| | | style: { fill: _config.plot.color } |
| | | }} |