@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
60 lines (59 loc) • 2.59 kB
TypeScript
import { Subject } from "rxjs";
import { DataManager } from "./data-manager";
import { Lasagna } from "./lasagna";
import { IInteractionDataPointsEvent, IRendererEventPayload, IRenderStateData } from "./types";
import { IInteractionValuesPayload } from "../plugins/types";
/**
* @ignore
*
* Manages and executes drawing and data point highlighting for each data series renderer and handles the setting of series display states
*/
export declare class RenderEngine {
private lasagna;
private dataManager;
/** Subject for emitting events to the outside world about data points closest to an interaction on the chart */
interactionDataPointsSubject: Subject<IInteractionDataPointsEvent>;
/** Subject passed to the renderer for triggering events regarding a data point */
rendererSubject: Subject<IRendererEventPayload<any>>;
private highlightDataPointSubscription;
private highlightedDataPoints;
private renderLayers;
private layerIndex;
constructor(lasagna: Lasagna, dataManager: DataManager);
/**
* Invokes the draw method on each of the series renderers
*/
update(): void;
/**
* Updates the lasagna layers and series containers based on the current series set
*/
updateSeriesContainers(): void;
/**
* Emits the HIGHLIGHT_DATA_POINT_EVENT if the highlighted index changes for a particular series.
* Emits an event with information about all of the highlighted data points if the highlighted index changes for any series.
*
* @param {IHighlightXYPayload} highlightedValues The highlighted values for each scale
*/
emitInteractionDataPoints(payload: IInteractionValuesPayload): void;
/**
* Invokes the renderer highlightDataPoint method for the specified series
*
* @param {string} seriesId The series on which to highlight a data point
* @param {number} index The data point index to highlight
*/
highlightDataPoint(seriesId: string, index: number): void;
/**
* Sets attributes specified in each state data object to the appropriate the series containers.
* Invokes a renderer's setSeriesState method when the state of its series container has been updated.
*
* @param {IRenderStateData[]} stateDataSet A collection of series states
*/
setSeriesStates(stateDataSet: IRenderStateData[]): void;
destroy(): void;
private buildLayerIndex;
private removeUnusedLayers;
private addNeededLayers;
private updateLayerContents;
private getSeriesChildContainers;
private getChildContainerId;
}