-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
I propose to make it possible for chartwer pod creators:
import { ChartwerkPod } from '@chartwerk/base';
export class MyChartwerkPod extends ChartwerkPod<any, any> {
constructor(el: HTMLElement, _series: any[] = [], _options: any = {}) {
super(d3, el, _series, _options);
this.init();
}
// overriding of super.init();
protected init() {
super.init();
// my init logic here
}This approach is very common to UI libs. Overriding of init function is crucial for polymorphic usage of pods. For example, we want to send our pod to a class which initializes pods in a spacial order, but client code can't reach that logic.
It other hand, we are not obligated to overload init method, which is also good.
Metadata
Metadata
Assignees
Labels
No labels