* Analyze items for overlap, changing opacity to hide items with * overlapping bounding boxes. This transform will preserve at least * two items (e.g., first and last) even if overlap persists. * @param {object} params - The parameters for this operator. * @param {function(*,*): number} [params.
(params)
| 120189 | * an item's bounds may exceed the scale range bounds and not be culled. |
| 120190 | * @constructor |
| 120191 | */ function Overlap(params) { |
| 120192 | (0, _vegaDataflow.Transform).call(this, null, params); |
| 120193 | } |
| 120194 | const methods = { |
| 120195 | parity: (items)=>items.filter((item, i)=>i % 2 ? item.opacity = 0 : 1), |
| 120196 | greedy: (items, sep)=>{ |