(column: Column, legend: VegaDeckGl.types.Legend, clickedIndex: number)
| 22 | } |
| 23 | |
| 24 | function selectCategorical(column: Column, legend: VegaDeckGl.types.Legend, clickedIndex: number): SearchExpressionGroup { |
| 25 | const value = legend.rows[clickedIndex].value; |
| 26 | if (value === Other) { |
| 27 | const values: string[] = []; |
| 28 | for (const i in legend.rows) { |
| 29 | if (+i !== clickedIndex) { |
| 30 | values.push(legend.rows[i].value); |
| 31 | } |
| 32 | } |
| 33 | return selectNone(column, values); |
| 34 | } else { |
| 35 | //select equal |
| 36 | return { expressions: [selectExact(column, legend.rows[clickedIndex].value)] }; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | function selectQuantitative(colorBinType: ColorBin, column: Column, legend: VegaDeckGl.types.Legend, clickedIndex: number): SearchExpressionGroup { |
| 41 | const keys = Object.keys(legend.rows).map(key => +key).sort((a, b) => +a - +b); |
no test coverage detected