// Generated by dts-bundle-generator v9.5.1 type CanvasRenderingTarget2D = any; declare const areaSeries: SeriesDefinition<"Area">; declare const barSeries: SeriesDefinition<"Bar">; declare const baselineSeries: SeriesDefinition<"Baseline">; declare const candlestickSeries: SeriesDefinition<"Candlestick">; declare const histogramSeries: SeriesDefinition<"Histogram">; declare const lineSeries: SeriesDefinition<"Line">; export declare const customSeriesDefaultOptions: CustomSeriesOptions; /** * Enumeration representing the sign of a marker. */ export declare const enum MarkerSign { /** Represents a negative change (-1) */ Negative = -1, /** Represents no change (0) */ Neutral = 0, /** Represents a positive change (1) */ Positive = 1, } /** * 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, /** * This mode disables rendering of the crosshair. */ Hidden = 2, /** * This mode sticks crosshair's horizontal line to the price value of a single-value series or to the open/high/low/close price of OHLC-based series. */ MagnetOHLC = 3, } /** * 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 dotted 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, /** * A curved line. */ Curved = 2, } /** * Search direction if no data found at provided index */ export declare enum MismatchDirection { /** * Search the nearest left item */ NearestLeft = -1, /** * Do not search */ None = 0, /** * Search the nearest right item */ NearestRight = 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 simplified main entry point of the Lightweight Charting Library with time points for the horizontal scale. * * @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; /** * This function is the main entry point of the Lightweight Charting Library. If you are using time values * for the horizontal scale then it is recommended that you rather use the {@link createChart} function. * * @template HorzScaleItem - type of points on the horizontal scale * @template THorzScaleBehavior - type of horizontal axis strategy that encapsulate all the specific behaviors of the horizontal scale type * * @param container - ID of HTML element or element itself * @param horzScaleBehavior - Horizontal scale behavior * @param options - Any subset of options to be applied at start. * @returns An interface to the created chart */ export declare function createChartEx< HorzScaleItem, THorzScaleBehavior extends IHorzScaleBehavior, >( container: string | HTMLElement, horzScaleBehavior: THorzScaleBehavior, options?: DeepPartial>, ): IChartApiBase; /** * Creates an image watermark. * * @param pane - Target pane. * @param imageUrl - Image URL. * @param options - Watermark options. * * @returns Image watermark wrapper. * * @example * ```js * import { createImageWatermark } from 'lightweight-charts'; * * const firstPane = chart.panes()[0]; * const imageWatermark = createImageWatermark(firstPane, '/images/my-image.png', { * alpha: 0.5, * padding: 20, * }); * // to change options * imageWatermark.applyOptions({ padding: 10 }); * // to remove watermark from the pane * imageWatermark.detach(); * ``` */ export declare function createImageWatermark( pane: IPaneApi, imageUrl: string, options: DeepPartial, ): IImageWatermarkPluginApi; /** * Creates an 'options' chart with price values on the horizontal scale. * * This function is used to create a specialized chart type where the horizontal scale * represents price values instead of time. It's particularly useful for visualizing * option chains, price distributions, or any data where price is the primary x-axis metric. * * @param container - The DOM element or its id where the chart will be rendered. * @param options - Optional configuration options for the price chart. * @returns An instance of IChartApiBase configured for price-based horizontal scaling. */ export declare function createOptionsChart( container: string | HTMLElement, options?: DeepPartial, ): IChartApiBase; /** * A function to create a series markers primitive. * * @param series - The series to which the primitive will be attached. * * @param markers - An array of markers to be displayed on the series. * * @param options - Options for the series markers plugin. * * @example * ```js * import { createSeriesMarkers } from 'lightweight-charts'; * * const seriesMarkers = createSeriesMarkers( * series, * [ * { * color: 'green', * position: 'inBar', * shape: 'arrowDown', * time: 1556880900, * }, * ] * ); * // and then you can modify the markers * // set it to empty array to remove all markers * seriesMarkers.setMarkers([]); * * // `seriesMarkers.markers()` returns current markers * ``` */ export declare function createSeriesMarkers( series: ISeriesApi, markers?: SeriesMarker[], options?: DeepPartial, ): ISeriesMarkersPluginApi; /** * Creates an image watermark. * * @param pane - Target pane. * @param options - Watermark options. * * @returns Image watermark wrapper. * * @example * ```js * import { createTextWatermark } from 'lightweight-charts'; * * const firstPane = chart.panes()[0]; * const textWatermark = createTextWatermark(firstPane, { * horzAlign: 'center', * vertAlign: 'center', * lines: [ * { * text: 'Hello', * color: 'rgba(255,0,0,0.5)', * fontSize: 100, * fontStyle: 'bold', * }, * { * text: 'This is a text watermark', * color: 'rgba(0,0,255,0.5)', * fontSize: 50, * fontStyle: 'italic', * fontFamily: 'monospace', * }, * ], * }); * // to change options * textWatermark.applyOptions({ horzAlign: 'left' }); * // to remove watermark from the pane * textWatermark.detach(); * ``` */ export declare function createTextWatermark( pane: IPaneApi, options: DeepPartial, ): ITextWatermarkPluginApi; /** * Creates and attaches the Series Up Down Markers Plugin. * * @param series - Series to which attach the Up Down Markers Plugin * @param options - options for the Up Down Markers Plugin * * @returns Api for Series Up Down Marker Plugin. {@link ISeriesUpDownMarkerPluginApi} * * @example * ```js * import { createUpDownMarkers, createChart, LineSeries } from 'lightweight-charts'; * * const chart = createChart('container'); * const lineSeries = chart.addSeries(LineSeries); * const upDownMarkers = createUpDownMarkers(lineSeries, { * positiveColor: '#22AB94', * negativeColor: '#F7525F', * updateVisibilityDuration: 5000, * }); * // to add some data * upDownMarkers.setData( * [ * { time: '2020-02-02', value: 12.34 }, * //... more line series data * ] * ); * // ... Update some values * upDownMarkers.update({ time: '2020-02-02', value: 13.54 }, true); * // to remove plugin from the series * upDownMarkers.detach(); * ``` */ export declare function createUpDownMarkers( series: ISeriesApi, options?: Partial, ): ISeriesUpDownMarkerPluginApi; /** * Creates a yield curve chart with the specified options. * * A yield curve chart differs from the default chart type * in the following ways: * - Horizontal scale is linearly spaced, and defined in monthly * time duration units * - Whitespace is ignored for the crosshair and grid lines * * @param container - ID of HTML element or element itself * @param options - The yield chart options. * @returns An interface to the created chart */ export declare function createYieldCurveChart( container: string | HTMLElement, options?: DeepPartial, ): IYieldCurveChartApi; /** * Provides the default implementation of the horizontal scale (time-based) that can be used as a base for extending the horizontal scale with custom behavior. * This allows for the introduction of custom functionality without re-implementing the entire {@link IHorzScaleBehavior}<{@link Time}> interface. * * For further details, refer to the {@link createChartEx} chart constructor method. * * @returns An uninitialized class implementing the {@link IHorzScaleBehavior}<{@link Time}> interface */ export declare function defaultHorzScaleBehavior(): new () => IHorzScaleBehavior