UNPKG

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

450 lines (449 loc) 15.6 kB
import * as Config from './config.js'; export interface Preset { legend?: 'color' | 'lightness' | 'size' | null; title?: string | null; subtitle?: string | null; caption?: string | null; reverse?: boolean; sort?: 'none' | 'byValue'; } /** Configuration for the column preset. */ export interface Column extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the groupedColumn preset. */ export interface GroupedColumn extends Preset { /** The groupedBy channel. */ groupedBy: string[] | string; /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the stackedColumn preset. */ export interface StackedColumn extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the splittedColumn preset. */ export interface SplittedColumn extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The splittedBy channel. */ splittedBy: string[] | string; } /** Configuration for the percentageColumn preset. */ export interface PercentageColumn extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the waterfall preset. */ export interface Waterfall extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the mekko preset. */ export interface Mekko extends Preset { /** The x channel. */ x: string[] | string; /** The groupedBy channel. */ groupedBy: string[] | string; /** The y channel. */ y: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the marimekko preset. */ export interface Marimekko extends Preset { /** The x channel. */ x: string[] | string; /** The groupedBy channel. */ groupedBy: string[] | string; /** The y channel. */ y: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the bar preset. */ export interface Bar extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the groupedBar preset. */ export interface GroupedBar extends Preset { /** The x channel. */ x: string[] | string; /** The groupedBy channel. */ groupedBy: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the stackedBar preset. */ export interface StackedBar extends Preset { /** The x channel. */ x: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the splittedBar preset. */ export interface SplittedBar extends Preset { /** The x channel. */ x: string[] | string; /** The splittedBy channel. */ splittedBy: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the percentageBar preset. */ export interface PercentageBar extends Preset { /** The x channel. */ x: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the lollipop preset. */ export interface Lollipop extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the scatter preset. */ export interface Scatter extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The dividedBy channel. */ dividedBy: string[] | string; } /** Configuration for the bubbleplot preset. */ export interface Bubbleplot extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The color channel. */ color: string[] | string; /** The size channel. */ size: string[] | string; /** The dividedBy channel. */ dividedBy: string[] | string; } /** Configuration for the area preset. */ export interface Area extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the stackedArea preset. */ export interface StackedArea extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the percentageArea preset. */ export interface PercentageArea extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the splittedArea preset. */ export interface SplittedArea extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The splittedBy channel. */ splittedBy: string[] | string; } /** Configuration for the stream preset. */ export interface Stream extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the verticalStream preset. */ export interface VerticalStream extends Preset { /** The x channel. */ x: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the violin preset. */ export interface Violin extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The splittedBy channel. */ splittedBy: string[] | string; } /** Configuration for the verticalViolin preset. */ export interface VerticalViolin extends Preset { /** The x channel. */ x: string[] | string; /** The splittedBy channel. */ splittedBy: string[] | string; /** The y channel. */ y: string[] | string; } /** Configuration for the line preset. */ export interface Line extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The dividedBy channel. */ dividedBy: string[] | string; } /** Configuration for the verticalLine preset. */ export interface VerticalLine extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The dividedBy channel. */ dividedBy: string[] | string; } /** Configuration for the pie preset. */ export interface Pie extends Preset { /** The angle channel. */ angle: string[] | string; /** The by channel. */ by: string[] | string; } /** Configuration for the polarColumn preset. */ export interface PolarColumn extends Preset { /** The angle channel. */ angle: string[] | string; /** The radius channel. */ radius: string[] | string; } /** Configuration for the polarStackedColumn preset. */ export interface PolarStackedColumn extends Preset { /** The angle channel. */ angle: string[] | string; /** The radius channel. */ radius: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the variableRadiusPie preset. */ export interface VariableRadiusPie extends Preset { /** The angle channel. */ angle: string[] | string; /** The by channel. */ by: string[] | string; /** The radius channel. */ radius: string[] | string; } /** Configuration for the radialBar preset. */ export interface RadialBar extends Preset { /** The angle channel. */ angle: string[] | string; /** The radius channel. */ radius: string[] | string; } /** Configuration for the radialStackedBar preset. */ export interface RadialStackedBar extends Preset { /** The angle channel. */ angle: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; /** The radius channel. */ radius: string[] | string; } /** Configuration for the donut preset. */ export interface Donut extends Preset { /** The angle channel. */ angle: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; } /** Configuration for the nestedDonut preset. */ export interface NestedDonut extends Preset { /** The angle channel. */ angle: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; /** The radius channel. */ radius: string[] | string; } /** Configuration for the polarScatter preset. */ export interface PolarScatter extends Preset { /** The angle channel. */ angle: string[] | string; /** The radius channel. */ radius: string[] | string; /** The dividedBy channel. */ dividedBy: string[] | string; } /** Configuration for the polarLine preset. */ export interface PolarLine extends Preset { /** The angle channel. */ angle: string[] | string; /** The radius channel. */ radius: string[] | string; /** The dividedBy channel. */ dividedBy: string[] | string; } /** Configuration for the treemap preset. */ export interface Treemap extends Preset { /** The size channel. */ size: string[] | string; /** The color channel. */ color: string[] | string; } /** Configuration for the stackedTreemap preset. */ export interface StackedTreemap extends Preset { /** The size channel. */ size: string[] | string; /** The dividedBy channel. */ dividedBy: string[] | string; /** The color channel. */ color: string[] | string; } /** Configuration for the heatmap preset. */ export interface Heatmap extends Preset { /** The x channel. */ x: string[] | string; /** The y channel. */ y: string[] | string; /** The lightness channel. */ lightness: string[] | string; } /** Configuration for the bubble preset. */ export interface Bubble extends Preset { /** The size channel. */ size: string[] | string; /** The color channel. */ color: string[] | string; } /** Configuration for the stackedBubble preset. */ export interface StackedBubble extends Preset { /** The size channel. */ size: string[] | string; /** The stackedBy channel. */ stackedBy: string[] | string; /** The color channel. */ color: string[] | string; } /** Collection of factory functions for creating preset chart configs. */ export interface Presets { /** Creates a chart config for the column preset. */ column(config: Column): Config.Chart; /** Creates a chart config for the groupedColumn preset. */ groupedColumn(config: GroupedColumn): Config.Chart; /** Creates a chart config for the stackedColumn preset. */ stackedColumn(config: StackedColumn): Config.Chart; /** Creates a chart config for the splittedColumn preset. */ splittedColumn(config: SplittedColumn): Config.Chart; /** Creates a chart config for the percentageColumn preset. */ percentageColumn(config: PercentageColumn): Config.Chart; /** Creates a chart config for the waterfall preset. */ waterfall(config: Waterfall): Config.Chart; /** Creates a chart config for the mekko preset. */ mekko(config: Mekko): Config.Chart; /** Creates a chart config for the marimekko preset. */ marimekko(config: Marimekko): Config.Chart; /** Creates a chart config for the bar preset. */ bar(config: Bar): Config.Chart; /** Creates a chart config for the groupedBar preset. */ groupedBar(config: GroupedBar): Config.Chart; /** Creates a chart config for the stackedBar preset. */ stackedBar(config: StackedBar): Config.Chart; /** Creates a chart config for the splittedBar preset. */ splittedBar(config: SplittedBar): Config.Chart; /** Creates a chart config for the percentageBar preset. */ percentageBar(config: PercentageBar): Config.Chart; /** Creates a chart config for the lollipop preset. */ lollipop(config: Lollipop): Config.Chart; /** Creates a chart config for the scatter preset. */ scatter(config: Scatter): Config.Chart; /** Creates a chart config for the bubbleplot preset. */ bubbleplot(config: Bubbleplot): Config.Chart; /** Creates a chart config for the area preset. */ area(config: Area): Config.Chart; /** Creates a chart config for the stackedArea preset. */ stackedArea(config: StackedArea): Config.Chart; /** Creates a chart config for the percentageArea preset. */ percentageArea(config: PercentageArea): Config.Chart; /** Creates a chart config for the splittedArea preset. */ splittedArea(config: SplittedArea): Config.Chart; /** Creates a chart config for the stream preset. */ stream(config: Stream): Config.Chart; /** Creates a chart config for the verticalStream preset. */ verticalStream(config: VerticalStream): Config.Chart; /** Creates a chart config for the violin preset. */ violin(config: Violin): Config.Chart; /** Creates a chart config for the verticalViolin preset. */ verticalViolin(config: VerticalViolin): Config.Chart; /** Creates a chart config for the line preset. */ line(config: Line): Config.Chart; /** Creates a chart config for the verticalLine preset. */ verticalLine(config: VerticalLine): Config.Chart; /** Creates a chart config for the pie preset. */ pie(config: Pie): Config.Chart; /** Creates a chart config for the polarColumn preset. */ polarColumn(config: PolarColumn): Config.Chart; /** Creates a chart config for the polarStackedColumn preset. */ polarStackedColumn(config: PolarStackedColumn): Config.Chart; /** Creates a chart config for the variableRadiusPie preset. */ variableRadiusPie(config: VariableRadiusPie): Config.Chart; /** Creates a chart config for the radialBar preset. */ radialBar(config: RadialBar): Config.Chart; /** Creates a chart config for the radialStackedBar preset. */ radialStackedBar(config: RadialStackedBar): Config.Chart; /** Creates a chart config for the donut preset. */ donut(config: Donut): Config.Chart; /** Creates a chart config for the nestedDonut preset. */ nestedDonut(config: NestedDonut): Config.Chart; /** Creates a chart config for the polarScatter preset. */ polarScatter(config: PolarScatter): Config.Chart; /** Creates a chart config for the polarLine preset. */ polarLine(config: PolarLine): Config.Chart; /** Creates a chart config for the treemap preset. */ treemap(config: Treemap): Config.Chart; /** Creates a chart config for the stackedTreemap preset. */ stackedTreemap(config: StackedTreemap): Config.Chart; /** Creates a chart config for the heatmap preset. */ heatmap(config: Heatmap): Config.Chart; /** Creates a chart config for the bubble preset. */ bubble(config: Bubble): Config.Chart; /** Creates a chart config for the stackedBubble preset. */ stackedBubble(config: StackedBubble): Config.Chart; }