Documentation menu

Interface

ChartLookOptions

Look options of FerroChart.create and applyOptions (r25). Keys not given keep their value.

Properties

NameTypeDescription
theme?'light' | 'dark' | ThemeObject

Color theme: 'light' (default), 'dark' or colors key by key.

preset?'sparkline'

Start from a set of options, then apply the other keys given: 'sparkline' = no axes, no grid, 2 px padding, interaction: false, a crosshair of a vertical line and a dot (shown only if interaction turns the crosshair back on).

priceAxis?boolean

The price axis. Default true. Hidden: no price labels at all.

timeAxis?boolean

The time axis. Default true.

grid?boolean | { horizontal?: boolean; vertical?: boolean; }

Grid lines. Default true.

padding?number | { top?: number; right?: number; bottom?: number; left?: number; }

Space around the plot area, CSS px. Default 0.

interaction?boolean | { pan?: boolean; zoom?: boolean; crosshair?: boolean; }

Which gestures the chart takes; false: none (the page scrolls over it, clicks still fire). Default true.

crosshairStyle?{ vertical?: boolean; horizontal?: boolean; labels?: boolean; dot?: CrosshairDot | null; }

What the crosshair draws. Default: both lines and the labels, no dot.

Declaration

export interface ChartLookOptions {
    theme?: 'light' | 'dark' | ThemeObject;
    preset?: 'sparkline';
    priceAxis?: boolean;
    timeAxis?: boolean;
    grid?: boolean | {
        horizontal?: boolean;
        vertical?: boolean;
    };
    padding?: number | {
        top?: number;
        right?: number;
        bottom?: number;
        left?: number;
    };
    interaction?: boolean | {
        pan?: boolean;
        zoom?: boolean;
        crosshair?: boolean;
    };
    crosshairStyle?: {
        vertical?: boolean;
        horizontal?: boolean;
        labels?: boolean;
        dot?: CrosshairDot | null;
    };
}

Used by

ChartCreateOptions, FerroChart