(legends, value)
| 120602 | return (key, d)=>opt[key] != null ? opt[key] : config[key] != null ? config[key] : d; |
| 120603 | } // if legends specify offset directly, use the maximum specified value |
| 120604 | function offsets(legends, value) { |
| 120605 | let max1 = -Infinity; |
| 120606 | legends.forEach((item)=>{ |
| 120607 | if (item.offset != null) max1 = Math.max(max1, item.offset); |
| 120608 | }); |
| 120609 | return max1 > -Infinity ? max1 : value; |
| 120610 | } |
| 120611 | function legendParams(g, orient, config, xb, yb, w, h) { |
| 120612 | const _ = lookup$1(config, orient), offset = offsets(g, _("offset", 0)), anchor = _("anchor", Start), mult = anchor === End ? 1 : anchor === Middle ? 0.5 : 0; |
| 120613 | const p = { |
no test coverage detected