]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
allow mode to be a callback function (#11488)
authorCazka <can_oe@me.com>
Wed, 6 Sep 2023 15:13:33 +0000 (17:13 +0200)
committerGitHub <noreply@github.com>
Wed, 6 Sep 2023 15:13:33 +0000 (17:13 +0200)
src/types/index.d.ts

index 518bf1dca28b2ffe7b54651596cc21d8ee5e8207..1a652c6dc1971bf05d3f9dbb240a80dab1f33852 100644 (file)
@@ -516,7 +516,7 @@ export declare class Chart<
   buildOrUpdateScales(): void;
   buildOrUpdateControllers(): void;
   reset(): void;
-  update(mode?: UpdateMode): void;
+  update(mode?: UpdateMode | ((ctx: { datasetIndex: number }) => UpdateMode)): void;
   render(): void;
   draw(): void;