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