(columns: Column[], data: object[])
| 61 | * @param data Array of data objects. |
| 62 | */ |
| 63 | export function inferAll(columns: Column[], data: object[]) { |
| 64 | columns.forEach(column => { |
| 65 | if (column) { |
| 66 | if (typeof column.quantitative !== 'boolean') { |
| 67 | column.quantitative = isQuantitative(column); |
| 68 | } |
| 69 | if (!column.stats) { |
| 70 | column.stats = getStats(data, column); |
| 71 | } |
| 72 | if (column.type === 'string' && typeof column.isColorData !== 'boolean') { |
| 73 | checkIsColorData(data, column); |
| 74 | } |
| 75 | } |
| 76 | }); |
| 77 | } |
| 78 | |
| 79 | function checkIsColorData(data: object[], column: Column) { |
| 80 | if (!column.stats.hasColorData) { |
no test coverage detected