* Helper to get the alignment of a tooltip given the size
(chart, options, size)
| 303 | * Helper to get the alignment of a tooltip given the size |
| 304 | */ |
| 305 | function determineAlignment(chart, options, size) { |
| 306 | const yAlign = size.yAlign || options.yAlign || determineYAlign(chart, size); |
| 307 | |
| 308 | return { |
| 309 | xAlign: size.xAlign || options.xAlign || determineXAlign(chart, options, size, yAlign), |
| 310 | yAlign |
| 311 | }; |
| 312 | } |
| 313 | |
| 314 | function alignX(size, xAlign) { |
| 315 | let {x, width} = size; |
no test coverage detected