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