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

50 lines (49 loc) 2.4 kB
import { XYGridConfig } from "../../core/grid/config/xy-grid-config"; import { RenderState } from "../../renderers/types"; import { Chart } from "../chart"; import { IChartAssist, ISpark } from "./types"; import { IAccessors, IChartAssistSeries, IChartMarker, IChartPalette, IChartSeries, IDataPointsPayload, IValueProvider } from "../common/types"; /** * Chart assist implementation to be used with spark charts */ export declare class SparkChartAssist implements IChartAssist { readonly showBottomAxis: boolean; readonly showTopBorder: boolean; palette: IChartPalette; markers: IValueProvider<IChartMarker>; /** Collection of ISpark objects */ sparks: ISpark<IAccessors>[]; /** Used for keeping tabs on the legend's active state */ isLegendActive: boolean; /** Grid config for all sparks except the last (bottom) one */ readonly gridConfig: XYGridConfig; /** Grid config for the last (bottom) spark */ readonly lastGridConfig: XYGridConfig; highlightedDataPoints: IDataPointsPayload; constructor(showBottomAxis?: boolean, showTopBorder?: boolean, palette?: IChartPalette, markers?: IValueProvider<IChartMarker>); /** * Use this method to update the set of sparks if they all consist of only one series. * If one or more sparks has multiple series use the updateSparks method instead. * * See {@link IChartAssist#update} */ update(inputSeriesSet: IChartAssistSeries<IAccessors>[]): void; /** * Use this method to update the set of sparks if any of them consist of more than one series. * * @param {ISpark<IAccessors>[]} sparks The collection of sparks to update */ updateSparks(sparks: ISpark<IAccessors>[]): void; /** See {@link IChartAssist#getHighlightedValue} */ getHighlightedValue(chartSeries: IChartSeries<IAccessors>, scaleKey: string, formatterName?: string): string | number; /** * To use the for-cycle trackBy, set the id value on each spark * and assign this function to the ngFor trackBy property */ trackByFn(_index: number, spark: ISpark<IAccessors>): string | undefined; setRenderState(_seriesId: string, _state: RenderState): void; getVisibleSeriesWithLegend(): IChartAssistSeries<IAccessors>[]; protected createChart(lastSpark: boolean): Chart; private configureEventSubscriptions; private reconfigureChart; }