UNPKG

@nova-ui/charts

Version:

Nova Charts is a library created to provide potential consumers with solutions for various data visualizations that conform with the Nova Design Language. It's designed to solve common patterns identified by UX designers, but also be very flexible so that

52 lines (51 loc) 1.36 kB
import { IChart } from "./common/types"; /** * @ignore * * Chart collection takes care of charts grouping and rebroadcasting selected events coming from one charts to other charts */ export declare class ChartCollection { lastIndex: number; /** * These events will be rebroadcasted to other charts in the collection * * @type {[string]} */ events: string[]; private charts; private subscriptions; private eventBus?; constructor(); /** * Register chart in this collection and subscribe to all configured events * * @param {IChart} chart */ addChart(chart: IChart): void; /** * Removed chart from the collection and unsubscribes all related subscriptions * * @param {IChart} chart */ removeChart(chart: IChart): void; /** * Destroy this collection and release related resources */ destroy(): void; private initializeEventBus; /** * Register subscription for given chart key on given observable * * @param {string} chartKey * @param {Observable<any>} observable * @param {(value: any) => void} next */ private subscribe; /** * Unsubscribes subscriptions that belong to given chart key * * @param {string} chartKey */ private unsubscribeChart; private getChartKey; }