/** * Additional reusable modules to extend PlotProps and PlotData props */ import { CSSProperties } from 'react'; import { BarLayoutOptions, OrientationOptions } from '.'; /** PlotProps addons */ /** Additional controls for legend layout & appearance. */ export declare type PlotLegendAddon = { /** Are legend items presented horizontally or vertically? */ orientation: 'vertical' | 'horizontal'; /** General horizontal position of the legend. */ horizontalPosition: 'auto' | 'left' | 'center' | 'right'; /** Positive numbers will adjust legend to the right, negative to the left. */ horizontalPaddingAdjustment?: number; /** General vertical position of the legend. */ verticalPosition: 'auto' | 'top' | 'middle' | 'bottom'; /** Positive numbers will adjust legend up, negative numbers will adjust it down. */ verticalPaddingAdjustment?: number; font?: { family: string; size: number; color: string; }; /** legend traceorder (for histogram filter) */ traceorder?: 'reversed' | 'grouped' | 'normal' | undefined; }; /** Specification to control plot margins and padding. */ export declare type PlotSpacingAddon = { /** The margin between the top edge of the container and the plot. */ marginTop?: number; /** The margin between the right edge of the container and the plot. */ marginRight?: number; /** The margin between the bottom edge of the container and the plot. */ marginBottom?: number; /** The margin between the left edge of the container and the plot. */ marginLeft?: number; /** Padding, applied equally on all sides. */ padding?: number; }; export declare const PlotSpacingDefault: Required; export declare type OrientationAddon = { /** Orientation of plot - default is vertical (e.g. independent axis at bottom) */ orientation?: OrientationOptions; }; export declare const OrientationDefault: OrientationOptions; export declare type OpacityAddon = { /** Opacity of markers that require opacity (e.g. outliers, overlaid bars). * Number 0 to 1 (default 0.5) */ opacity?: number; }; export declare const OpacityDefault: number; export declare type independentAxisLogScaleAddon = { /** Use a log scale for independent axis. Default is false */ independentAxisLogScale?: boolean; }; export declare const independentAxisLogScaleDefault: boolean; export declare type DependentAxisLogScaleAddon = { /** Use a log scale for dependent axis. Default is false */ dependentAxisLogScale?: boolean; }; export declare const DependentAxisLogScaleDefault: boolean; /** BarLayout - options and default differ depending on usage */ export declare type BarLayoutAddon = { /** How bars are displayed when there are multiple series. */ barLayout?: O; }; /** valueType for when components or widgets take number or date types */ export declare type ValueTypeAddon = { /** Type of variable 'number' or 'date' */ valueType?: 'number' | 'date'; }; /** simple string label prop */ export declare type LabelAddon = { /** Label for component or widget */ label?: string; }; /** container styling */ export declare type ContainerStylesAddon = { /** Additional styles for component's container. Optional */ containerStyles?: CSSProperties; }; /** PlotData addons */ export declare type AvailableUnitsAddon = { /** What units does the backend support switching between? */ availableUnits: Array; /** Currently selected unit. */ selectedUnit: string; } | { /** What units does the backend support switching between? */ availableUnits?: never; /** Currently selected unit. */ selectedUnit?: never; }; /** Marker scale addon * default value of 1 is regular size */ export declare type MarkerScaleAddon = { markerScale?: number; }; export declare const MarkerScaleDefault: number; /** Color palette addon */ export declare type ColorPaletteAddon = { colorPalette?: string[]; }; /** Based on [Tol's muted colormap](https://personal.sron.nl/~pault/) */ export declare const ColorPaletteDefault: string[]; /** Darker color palette, useful for overlay traces, such as smoothed mean in scatter plots */ export declare const ColorPaletteDark: string[]; /** Based on [Tol's muted colormap](https://personal.sron.nl/~pault/) */ /** Needs work - this is a draft for purposes of discussion and choosing an ordinal colormap */ export declare const ColorPaletteOrdinal: string[]; /** Sequential gradient colorscale. Useful for coloring based on a continuous variable that is always positive, for example. */ /** Using oslo from https://www.fabiocrameri.ch/colourmaps/, copied from https://github.com/empet/scientific-colorscales/blob/master/scicolorscales.py */ export declare const SequentialGradientColorscale: string[]; /** * Diverging gradient colorscale. Useful for coloring a continuous variable that has values above and below a midpoint (usually 0) * Using vik from https://www.fabiocrameri.ch/colourmaps/, copied from https://github.com/empet/scientific-colorscales/blob/master/scicolorscales.py * MUST have ODD number of colors! Assume the middle color maps to the midpoint */ export declare const DivergingGradientColorscale: string[]; export declare const ConvergingGradientColorscale: string[]; export declare const gradientSequentialColorscaleMap: import("d3-scale").ScaleLinear; export declare const gradientDivergingColorscaleMap: import("d3-scale").ScaleLinear; export declare const gradientConvergingColorscaleMap: import("d3-scale").ScaleLinear; /** truncated axis flags */ export declare type AxisTruncationAddon = { /** truncation config (flags) to show truncated axis (true) or not (false) */ axisTruncationConfig?: AxisTruncationConfig; }; export declare type AxisTruncationConfig = { independentAxis?: { min?: boolean; max?: boolean; }; dependentAxis?: { min?: boolean; max?: boolean; }; }; //# sourceMappingURL=addOns.d.ts.map