* @typedef { import('./core.controller.js').default } Chart * @typedef { import('./core.scale.js').default } Scale
(scale, allowedOverflow)
| 10 | */ |
| 11 | |
| 12 | function scaleClip(scale, allowedOverflow) { |
| 13 | const opts = scale && scale.options || {}; |
| 14 | const reverse = opts.reverse; |
| 15 | const min = opts.min === undefined ? allowedOverflow : 0; |
| 16 | const max = opts.max === undefined ? allowedOverflow : 0; |
| 17 | return { |
| 18 | start: reverse ? max : min, |
| 19 | end: reverse ? min : max |
| 20 | }; |
| 21 | } |
| 22 | |
| 23 | function defaultClip(xScale, yScale, allowedOverflow) { |
| 24 | if (allowedOverflow === false) { |