* Draws dataset at index unless a plugin returns `false` to the `beforeDatasetDraw` * hook, in which case, plugins will not be called on `afterDatasetDraw`. * @private
(meta)
| 781 | * @private |
| 782 | */ |
| 783 | _drawDataset(meta) { |
| 784 | const ctx = this.ctx; |
| 785 | const args = { |
| 786 | meta, |
| 787 | index: meta.index, |
| 788 | cancelable: true |
| 789 | }; |
| 790 | // @ts-expect-error |
| 791 | const clip = getDatasetClipArea(this, meta); |
| 792 | |
| 793 | if (this.notifyPlugins('beforeDatasetDraw', args) === false) { |
| 794 | return; |
| 795 | } |
| 796 | |
| 797 | if (clip) { |
| 798 | clipArea(ctx, clip); |
| 799 | } |
| 800 | |
| 801 | meta.controller.draw(); |
| 802 | |
| 803 | if (clip) { |
| 804 | unclipArea(ctx); |
| 805 | } |
| 806 | |
| 807 | args.cancelable = false; |
| 808 | this.notifyPlugins('afterDatasetDraw', args); |
| 809 | } |
| 810 | |
| 811 | /** |
| 812 | * Checks whether the given point is in the chart area. |
no test coverage detected