// Generated by dts-bundle-generator v6.4.0 /** * Represents a type of color. */ export declare enum ColorType { /** Solid color */ Solid = "solid", /** Vertical gradient color */ VerticalGradient = "gradient" } /** * Represents the crosshair mode. */ export declare enum CrosshairMode { /** * This mode allows crosshair to move freely on the chart. */ Normal = 0, /** * This mode sticks crosshair's horizontal line to the price value of a single-value series or to the close price of OHLC-based series. */ Magnet = 1 } /** * Represents the type of the last price animation for series such as area or line. */ export declare enum LastPriceAnimationMode { /** * Animation is always disabled */ Disabled = 0, /** * Animation is always enabled. */ Continuous = 1, /** * Animation is active after new data. */ OnDataUpdate = 2 } /** * Represents the possible line styles. */ export declare enum LineStyle { /** * A solid line. */ Solid = 0, /** * A dotted line. */ Dotted = 1, /** * A dashed line. */ Dashed = 2, /** * A dashed line with bigger dashes. */ LargeDashed = 3, /** * A dottled line with more space between dots. */ SparseDotted = 4 } /** * Represents the possible line types. */ export declare enum LineType { /** * A line. */ Simple = 0, /** * A stepped line. */ WithSteps = 1 } /** * Represents the source of data to be used for the horizontal price line. */ export declare enum PriceLineSource { /** * Use the last bar data. */ LastBar = 0, /** * Use the last visible data of the chart viewport. */ LastVisible = 1 } /** * Represents the price scale mode. */ export declare enum PriceScaleMode { /** * Price scale shows prices. Price range changes linearly. */ Normal = 0, /** * Price scale shows prices. Price range changes logarithmically. */ Logarithmic = 1, /** * Price scale shows percentage values according the first visible value of the price scale. * The first visible value is 0% in this mode. */ Percentage = 2, /** * The same as percentage mode, but the first value is moved to 100. */ IndexedTo100 = 3 } /** * Represents the type of a tick mark on the time axis. */ export declare enum TickMarkType { /** * The start of the year (e.g. it's the first tick mark in a year). */ Year = 0, /** * The start of the month (e.g. it's the first tick mark in a month). */ Month = 1, /** * A day of the month. */ DayOfMonth = 2, /** * A time without seconds. */ Time = 3, /** * A time with seconds. */ TimeWithSeconds = 4 } /** * Determine how to exit the tracking mode. * * By default, mobile users will long press to deactivate the scroll and have the ability to check values and dates. * Another press is required to activate the scroll, be able to move left/right, zoom, etc. */ export declare enum TrackingModeExitMode { /** * Tracking Mode will be deactivated on touch end event. */ OnTouchEnd = 0, /** * Tracking Mode will be deactivated on the next tap event. */ OnNextTap = 1 } /** * This function is the main entry point of the Lightweight Charting Library. * * @param container - ID of HTML element or element itself * @param options - Any subset of options to be applied at start. * @returns An interface to the created chart */ export declare function createChart(container: string | HTMLElement, options?: DeepPartial): IChartApi; /** * Check if a time value is a business day object. * * @param time - The time to check. * @returns `true` if `time` is a {@link BusinessDay} object, false otherwise. */ export declare function isBusinessDay(time: Time): time is BusinessDay; /** * Check if a time value is a UTC timestamp number. * * @param time - The time to check. * @returns `true` if `time` is a {@link UTCTimestamp} number, false otherwise. */ export declare function isUTCTimestamp(time: Time): time is UTCTimestamp; /** * Returns the current version as a string. For example `'3.3.0'`. */ export declare function version(): string; /** * Represents area series options. */ export declare type AreaSeriesOptions = SeriesOptions; /** * Represents area series options where all properties are optional. */ export declare type AreaSeriesPartialOptions = SeriesPartialOptions; /** * A custom function used to get autoscale information. * * @param baseImplementation - The default implementation of autoscale algorithm, you can use it to adjust the result. */ export declare type AutoscaleInfoProvider = (baseImplementation: () => AutoscaleInfo | null) => AutoscaleInfo | null; /** * Represents the background color of the chart. */ export declare type Background = SolidColor | VerticalGradientColor; /** * Represents a price as a `number`. */ export declare type BarPrice = Nominal; /** * Represents bar series options. */ export declare type BarSeriesOptions = SeriesOptions; /** * Represents bar series options where all properties are options. */ export declare type BarSeriesPartialOptions = SeriesPartialOptions; /** * Represents a type of a base value of baseline series type. */ export declare type BaseValueType = BaseValuePrice; /** * Structure describing baseline series options. */ export declare type BaselineSeriesOptions = SeriesOptions; /** * Represents baseline series options where all properties are options. */ export declare type BaselineSeriesPartialOptions = SeriesPartialOptions; /** * Represents candlestick series options. */ export declare type CandlestickSeriesOptions = SeriesOptions; /** * Represents candlestick series options where all properties are optional. */ export declare type CandlestickSeriesPartialOptions = SeriesPartialOptions; /** * Represents a coordiate as a `number`. */ export declare type Coordinate = Nominal; /** * Represents a type `T` where every property is optional. */ export declare type DeepPartial = { [P in keyof T]?: T[P] extends (infer U)[] ? DeepPartial[] : T[P] extends readonly (infer X)[] ? readonly DeepPartial[] : DeepPartial; }; /** * Represents histogram series options. */ export declare type HistogramSeriesOptions = SeriesOptions; /** * Represents histogram series options where all properties are optional. */ export declare type HistogramSeriesPartialOptions = SeriesPartialOptions; /** * Represents a horizontal alignment. */ export declare type HorzAlign = "left" | "center" | "right"; /** * Represents line series options. */ export declare type LineSeriesOptions = SeriesOptions; /** * Represents line series options where all properties are optional. */ export declare type LineSeriesPartialOptions = SeriesPartialOptions; /** * Represents the width of a line. */ export declare type LineWidth = 1 | 2 | 3 | 4; /** * Represents the `to` or `from` number in a logical range. */ export declare type Logical = Nominal; /** * A logical range is an object with 2 properties: `from` and `to`, which are numbers and represent logical indexes on the time scale. * * The starting point of the time scale's logical range is the first data item among all series. * Before that point all indexes are negative, starting from that point - positive. * * Indexes might have fractional parts, for instance 4.2, due to the time-scale being continuous rather than discrete. * * Integer part of the logical index means index of the fully visible bar. * Thus, if we have 5.2 as the last visible logical index (`to` field), that means that the last visible bar has index 5, but we also have partially visible (for 20%) 6th bar. * Half (e.g. 1.5, 3.5, 10.5) means exactly a middle of the bar. */ export declare type LogicalRange = Range; /** * A custom function used to handle changes to the time scale's logical range. */ export declare type LogicalRangeChangeEventHandler = (logicalRange: LogicalRange | null) => void; /** * A custom function use to handle mouse events. */ export declare type MouseEventHandler = (param: MouseEventParams) => void; /** * This is the generic type useful for declaring a nominal type, * which does not structurally matches with the base type and * the other types declared over the same base type * * @example * ```ts * type Index = Nominal; * // let i: Index = 42; // this fails to compile * let i: Index = 42 as Index; // OK * ``` * @example * ```ts * type TagName = Nominal; * ``` */ export declare type Nominal = T & { /** The 'name' or species of the nominal. */ [Symbol.species]: Name; }; /** * Represents overlay price scale options. */ export declare type OverlayPriceScaleOptions = Omit; /** * Represents information used to format prices. */ export declare type PriceFormat = PriceFormatBuiltIn | PriceFormatCustom; /** * A function used to format a {@link BarPrice} as a string. */ export declare type PriceFormatterFn = (priceValue: BarPrice) => string; /** * Represents the position of a series marker relative to a bar. */ export declare type SeriesMarkerPosition = "aboveBar" | "belowBar" | "inBar"; /** * Represents the shape of a series marker. */ export declare type SeriesMarkerShape = "circle" | "square" | "arrowUp" | "arrowDown"; /** * Represents the intersection of a series type `T`'s options and common series options. * * @see {@link SeriesOptionsCommon} for common options. */ export declare type SeriesOptions = T & SeriesOptionsCommon; /** * Represents a {@link SeriesOptions} where every property is optional. */ export declare type SeriesPartialOptions = DeepPartial; /** * Represents a type of series. * * @see {@link SeriesOptionsMap} */ export declare type SeriesType = keyof SeriesOptionsMap; /** * A custom function used to handle changes to the time scale's size. */ export declare type SizeChangeEventHandler = (width: number, height: number) => void; /** * The `TickMarkFormatter` is used to customize tick mark labels on the time scale. * * This function should return `time` as a string formatted according to `tickMarkType` type (year, month, etc) and `locale`. * * Note that the returned string should be the shortest possible value and should have no more than 8 characters. * Otherwise, the tick marks will overlap each other. * * @example * ```js * const customFormatter = (time, tickMarkType, locale) => { * // your code here * }; * ``` */ export declare type TickMarkFormatter = (time: UTCTimestamp | BusinessDay, tickMarkType: TickMarkType, locale: string) => string; /** * The Time type is used to represent the time of data items. * * Values can be a {@link UTCTimestamp}, a {@link BusinessDay}, or a business day string in ISO format. * * @example * ```js * const timestamp = 1529899200; // Literal timestamp representing 2018-06-25T04:00:00.000Z * const businessDay = { year: 2019, month: 6, day: 1 }; // June 1, 2019 * const businessDayString = '2021-02-03'; // Business day string literal * ``` */ export declare type Time = UTCTimestamp | BusinessDay | string; /** * A custom function used to override formatting of a time to a string. */ export declare type TimeFormatterFn = (time: BusinessDay | UTCTimestamp) => string; /** * Represents a {@link Time} range. */ export declare type TimeRange = Range