vizzu
Version:
Vizzu is a free, open-source Javascript/C++ library utilizing a generic dataviz engine that generates many types of charts and seamlessly animates between them. It can be used to create static charts but more importantly it is designed for building animat
63 lines (62 loc) • 2.09 kB
TypeScript
import * as Anim from '../types/anim.js';
import * as Config from '../types/config.js';
import * as Data from '../types/data.js';
import { Plugin, PluginHooks } from '../plugins.js';
import Vizzu from '../vizzu.js';
import { Snapshot } from '../module/cchart.js';
import { CAnimation } from '../module/canimctrl.js';
export type AnySeriesList = Data.SeriesList | Data.SeriesDescriptor | string | string[] | null;
export type LazyChannel = Config.Channel & {
set?: AnySeriesList;
attach?: AnySeriesList;
detach?: AnySeriesList;
};
export type AnyChannel = LazyChannel | AnySeriesList;
export type LazyChannels = {
[ChannelName in keyof Config.Channels]: AnyChannel;
};
export type LazyChart = Omit<Config.Chart, 'channels'> & {
channels?: LazyChannels;
};
export type AnyChart = LazyChart & LazyChannels;
export type LazyTarget = Anim.Target & {
config?: AnyChart;
};
export type AnyTarget = LazyTarget | AnyChart | Snapshot;
export type AnyOptions = Anim.Options | Anim.Duration | null;
export interface LazyKeyframe {
target: AnyTarget;
options?: AnyOptions;
}
export type AnyKeyframe = LazyKeyframe | AnyTarget;
export type LazyKeyframes = AnyKeyframe[];
export type AnyAnimTarget = LazyKeyframes | AnyTarget | CAnimation;
export type AnyAnimOptions = Anim.ControlOptions & AnyOptions;
export declare class Shorthands implements Plugin {
private _chart?;
private _channelNames?;
meta: {
name: string;
};
get hooks(): PluginHooks;
register(chart: Vizzu): void;
private _normalize;
private _normalizeKeyframes;
private _toKeyframe;
private _isKeyframes;
private _isKeyframe;
private _normalizeKeyframe;
private _normalizeTarget;
private _normalizeStyle;
private _isTarget;
private _isConfig;
private _normalizeConfig;
private _normalizeConfigChannel;
private _isChannelName;
private _normalizeChannels;
private _normalizeChannel;
private _isAnySeriesList;
private _normalizeSeriesList;
private _normalizeSeriesDescriptor;
private _normalizeOptions;
}