in src/visualComponent/sparkline/sparklineComponent.ts [102:132]
public render(options: ISparklineComponentRenderOptions) {
this.renderOptions = options;
const {
current,
series,
viewport,
position,
} = this.renderOptions;
this.updateSize(viewport.width, viewport.height);
this.updateElementOrder(this.element, position);
if (current && series) {
if (!this.components.length) {
this.initialize();
}
this.renderComponent(this.renderOptions);
const tooltipText: string = current && current.formattedTooltip || null;
this.constructorOptions.tooltipServiceWrapper.addTooltip(
this.element,
(data) => tooltipText ? [{ displayName: null, value: tooltipText, }] : null
);
} else {
this.destroyComponents();
}
}