MCPcopy
hub / github.com/chartjs/Chart.js / getProps

Method getProps

src/core/core.element.ts:33–44  ·  src/core/core.element.ts::Element.getProps
(props: string[], final?: boolean)

Source from the content-addressed store, hash-verified

31 getProps<P extends (keyof T)[]>(props: P, final?: boolean): Pick<T, P[number]>;
32 getProps<P extends string>(props: P[], final?: boolean): Partial<Record<P, unknown>>;
33 getProps(props: string[], final?: boolean): Partial<Record<string, unknown>> {
34 const anims = this.$animations;
35 if (!final || !anims) {
36 class="cm">// let's not create an object, if not needed
37 return this as Record<string, unknown>;
38 }
39 const ret: Record<string, unknown> = {};
40 props.forEach((prop) => {
41 ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop as string];
42 });
43 return ret;
44 }
45}

Callers 15

tooltipPositionMethod · 0.95
getGradientFunction · 0.80
evaluationFuncFunction · 0.80
inRangeMethod · 0.80
getCenterPointMethod · 0.80
getBarBoundsFunction · 0.80
parseBorderRadiusFunction · 0.80
getCenterPointMethod · 0.80

Calls 1

activeMethod · 0.80

Tested by

no test coverage detected