| | |
| | | _data = [..._mdata.values()] |
| | | } |
| | | |
| | | if (plot.correction && plot.chartType === 'bar' && plot.enabled !== 'true' && _data.length > 0 && _data.length < plot.correction) { |
| | | if (plot.customs && plot.customs.filter(cell => cell.chartType !== 'bar').length === 0) { |
| | | if (plot.correction && plot.chartType === 'bar' && _data.length > 0 && _data.length < plot.correction) { |
| | | if (plot.enabled !== 'true' || (plot.customs && plot.customs.filter(cell => cell.chartType !== 'bar').length === 0)) { |
| | | let _num = plot.correction - _data.length |
| | | for (let i = 0; i < _num; i++) { |
| | | let _val = Array( i + 2 ).join(' ') |
| | |
| | | nice: true |
| | | }) |
| | | |
| | | // 坐标轴格式化 |
| | | chart.axis(plot.Xaxis, { |
| | | label: { |
| | | formatter: (val) => { |
| | | if (!val || /^\s*$/.test(val)) return val |
| | | let _val = `${val}` |
| | | if (_val.length <= 10) return val |
| | | return _val.substring(0, 5) + '...' |
| | | } |
| | | } |
| | | }) |
| | | |
| | | if (!plot.legend || plot.legend === 'hidden') { |
| | | chart.legend(false) |
| | | } else { |
| | |
| | | range: [0.05, 0.95] |
| | | }) |
| | | } |
| | | |
| | | // 坐标轴格式化 |
| | | chart.axis(plot.Xaxis, { |
| | | label: { |
| | | formatter: (val) => { |
| | | if (!val || /^\s*$/.test(val)) return val |
| | | let _val = `${val}` |
| | | if (_val.length <= 10) return val |
| | | return _val.substring(0, 5) + '...' |
| | | } |
| | | } |
| | | }) |
| | | |
| | | if (!plot.legend || plot.legend === 'hidden') { |
| | | chart.legend(false) |
| | |
| | | nice: true |
| | | }) |
| | | |
| | | // 坐标轴格式化 |
| | | chart.axis(plot.Xaxis, { |
| | | label: { |
| | | formatter: (val) => { |
| | | if (!val || /^\s*$/.test(val)) return val |
| | | let _val = `${val}` |
| | | if (_val.length <= 10) return val |
| | | return _val.substring(0, 5) + '...' |
| | | } |
| | | } |
| | | }) |
| | | |
| | | if (!plot.legend || plot.legend === 'hidden') { |
| | | chart.legend(false) |
| | | } else { |