(chart: Chart, pixel: number, width: number)
| 123 | * @private |
| 124 | */ |
| 125 | export function _alignPixel(chart: Chart, pixel: number, width: number) { |
| 126 | const devicePixelRatio = chart.currentDevicePixelRatio; |
| 127 | const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0; |
| 128 | return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth; |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Clears the entire canvas. |
no outgoing calls
no test coverage detected