* 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)
| 860 | * @private |
| 861 | */ |
| 862 | _drawDataset(meta) { |
| 863 | const ctx = this.ctx; |
| 864 | const args = { |
| 865 | meta, |
| 866 | index: meta.index, |
| 867 | cancelable: true |
| 868 | }; |
| 869 | // @ts-expect-error |
| 870 | const clip = getDatasetClipArea(this, meta); |
| 871 | |
| 872 | if (this.notifyPlugins('beforeDatasetDraw', args) === false) { |
| 873 | return; |
| 874 | } |
| 875 | |
| 876 | if (clip) { |
| 877 | clipArea(ctx, clip); |
| 878 | } |
| 879 | |
| 880 | meta.controller.draw(); |
| 881 | |
| 882 | if (clip) { |
| 883 | unclipArea(ctx); |
| 884 | } |
| 885 | |
| 886 | args.cancelable = false; |
| 887 | this.notifyPlugins('afterDatasetDraw', args); |
| 888 | } |
| 889 | |
| 890 | /** |
| 891 | * Checks whether the given point is in the chart area. |
no test coverage detected