* @protected
(chartArea)
| 1560 | * @protected |
| 1561 | */ |
| 1562 | drawLabels(chartArea) { |
| 1563 | const optionTicks = this.options.ticks; |
| 1564 | |
| 1565 | if (!optionTicks.display) { |
| 1566 | return; |
| 1567 | } |
| 1568 | |
| 1569 | const ctx = this.ctx; |
| 1570 | |
| 1571 | const area = this._computeLabelArea(); |
| 1572 | if (area) { |
| 1573 | clipArea(ctx, area); |
| 1574 | } |
| 1575 | |
| 1576 | const items = this.getLabelItems(chartArea); |
| 1577 | for (const item of items) { |
| 1578 | const renderTextOptions = item.options; |
| 1579 | const tickFont = item.font; |
| 1580 | const label = item.label; |
| 1581 | const y = item.textOffset; |
| 1582 | renderText(ctx, label, 0, y, tickFont, renderTextOptions); |
| 1583 | } |
| 1584 | |
| 1585 | if (area) { |
| 1586 | unclipArea(ctx); |
| 1587 | } |
| 1588 | } |
| 1589 | |
| 1590 | /** |
| 1591 | * @protected |
no test coverage detected