(axes)
| 34 | } |
| 35 | |
| 36 | function getAxesWithFilter(axes) { |
| 37 | const groups = { |
| 38 | x: [], |
| 39 | y: [], |
| 40 | series: [], |
| 41 | multiQuota: [], |
| 42 | multiQuotaName: undefined, |
| 43 | } |
| 44 | |
| 45 | // 分组 |
| 46 | axes.forEach((axis) => { |
| 47 | if (axis.type === 'x') groups.x.push(axis) |
| 48 | else if (axis.type === 'y') groups.y.push(axis) |
| 49 | else if (axis.type === 'series') groups.series.push(axis) |
| 50 | else if (axis.type === 'other-info') groups.multiQuotaName = axis.value |
| 51 | }) |
| 52 | |
| 53 | // 应用过滤规则 |
| 54 | if (groups.series.length > 0) { |
| 55 | groups.y = groups.y.slice(0, 1) |
| 56 | } else { |
| 57 | const multiQuotaY = groups.y.filter((item) => item['multi-quota'] === true) |
| 58 | groups.multiQuota = multiQuotaY.map((item) => item.value) |
| 59 | if (multiQuotaY.length > 0) { |
| 60 | groups.y = multiQuotaY |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | return groups |
| 65 | } |
| 66 | |
| 67 | function processMultiQuotaData( |
| 68 | x, |
no test coverage detected