import { type CreateXYAxisSeriesOptions, type IRenderContext, LineStyle, type OxyColor, type OxyRect, type PlotModelSerializeOptions, type ScreenPoint, TrackerHitResult, type TrackerStringFormatterType, XYAxisSeries } from '../..'; /** * Represents an item in a CandleStickAndVolumeSeries. */ export interface OhlcvItem { /** * The X value (time). */ x: number; /** * The buy volume. */ buyVolume: number; /** * The sell volume. */ sellVolume: number; } export declare function newOhlcvItem(x: number, buyVolume: number, sellVolume: number): OhlcvItem; export declare class OhlcvItemHelper { /** * Find index of max(x) <= target x in a list of OHLCV items */ static findIndex(items: OhlcvItem[], targetX: number, guessIdx: number): number; /** * Indicate whether is valid for rendering or not */ static isValid(item: OhlcvItem): boolean; } /** * Represents rendering style for volume in either CandleStickAndVolumeSeries or VolumeSeries. */ export declare enum VolumeStyle { /** * Volume is not displayed */ None = 0, /** * Buy + Sell volume summed to produce net positive or negative volume */ Combined = 1, /** * Buy and Sell volume is stacked, one on top of the other, with the dominant on top */ Stacked = 2, /** * Buy volume above y=0 axis and Sell volume below y=0 axis */ PositiveNegative = 3 } export interface CreateVolumeSeriesOptions extends CreateXYAxisSeriesOptions { /** * The items of the series. */ items?: OhlcvItem[]; /** * The style of volume rendering (defaults to Combined). */ volumeStyle?: VolumeStyle; /** * The thickness of the bar lines. */ strokeThickness?: number; /** * The stroke intensity scale (used to generate stroke color from positive or negative color). * For example, 1.0 = same color and 0.5 is 1/2 of the intensity of the source fill color. */ strokeIntensity?: number; /** * The color used when the closing value is greater than opening value or * for buying volume. */ positiveColor?: OxyColor; /** * The fill color used when the closing value is less than opening value or * for selling volume. */ negativeColor?: OxyColor; /** * The stroke color of the Y=0 intercept. */ interceptColor?: OxyColor; /** * The thickness of the Y=0 intercept. */ interceptStrokeThickness?: number; /** * The line style of the Y=0 intercept. */ interceptLineStyle?: LineStyle; /** * A value indicating whether positive bars are shown as filled (false) or hollow (true) candlesticks. */ positiveHollow?: boolean; /** * A value indicating whether negative bars are shown as filled (false) or hollow (true) candlesticks. */ negativeHollow?: boolean; /** * The bar width in data units (for example if the X axis is date/time based, then should * use the difference of DateTimeAxis.toDouble(date) to indicate the width). By default, candlestick * series will use 0.80 x the minimum difference in data points. */ barWidth?: number; } export declare const DefaultVolumeSeriesOptions: CreateVolumeSeriesOptions; export declare const ExtendedDefaultVolumeSeriesOptions: { /** * The items of the series. */ items?: OhlcvItem[] | undefined; /** * The style of volume rendering (defaults to Combined). */ volumeStyle?: VolumeStyle | undefined; /** * The thickness of the bar lines. */ strokeThickness?: number | undefined; /** * The stroke intensity scale (used to generate stroke color from positive or negative color). * For example, 1.0 = same color and 0.5 is 1/2 of the intensity of the source fill color. */ strokeIntensity?: number | undefined; /** * The color used when the closing value is greater than opening value or * for buying volume. */ positiveColor?: string | undefined; /** * The fill color used when the closing value is less than opening value or * for selling volume. */ negativeColor?: string | undefined; /** * The stroke color of the Y=0 intercept. */ interceptColor?: string | undefined; /** * The thickness of the Y=0 intercept. */ interceptStrokeThickness?: number | undefined; /** * The line style of the Y=0 intercept. */ interceptLineStyle?: LineStyle | undefined; /** * A value indicating whether positive bars are shown as filled (false) or hollow (true) candlesticks. */ positiveHollow?: boolean | undefined; /** * A value indicating whether negative bars are shown as filled (false) or hollow (true) candlesticks. */ negativeHollow?: boolean | undefined; /** * The bar width in data units (for example if the X axis is date/time based, then should * use the difference of DateTimeAxis.toDouble(date) to indicate the width). By default, candlestick * series will use 0.80 x the minimum difference in data points. */ barWidth?: number | undefined; xAxisKey?: string | undefined; yAxisKey?: string | undefined; itemsSource?: any[] | undefined; background?: string | undefined; isVisible?: boolean | undefined; title?: string | undefined; legendKey?: string | undefined; seriesGroupName?: string | undefined; renderInLegend?: boolean | undefined; trackerStringFormatter?: TrackerStringFormatterType | undefined; trackerKey?: string | undefined; font?: string | undefined; fontSize?: number | undefined; fontWeight?: number | undefined; tag?: any; textColor?: string | undefined; edgeRenderingMode?: import('../..').EdgeRenderingMode | undefined; toolTip?: string | undefined; selectable?: boolean | undefined; selectionMode?: import('../..').SelectionMode | undefined; DefaultXYAxisSeriesOptions: CreateXYAxisSeriesOptions; }; /** * Represents a dual view (candlestick + volume) series for OHLCV bars. * See http://www.mathworks.com/help/toolbox/finance/highlowfts.html */ export declare class VolumeSeries extends XYAxisSeries { /** * The default tracker formatter. */ static readonly DefaultTrackerStringFormatter: TrackerStringFormatterType; /** * The data series. */ private _items; /** * The minimum X gap between successive data items. */ private _minDx; /** * The index of the data item at the start of visible window. */ private _winIndex; /** * Initializes a new instance of the VolumeSeries class. */ constructor(opt?: CreateVolumeSeriesOptions); getElementName(): string; /** * Gets or sets the items of the series. */ get items(): OhlcvItem[]; set items(value: OhlcvItem[]); /** * Gets or sets the style of volume rendering (defaults to Combined). */ volumeStyle: VolumeStyle; /** * Gets or sets the thickness of the bar lines. */ strokeThickness: number; /** * Gets or sets the stroke intensity scale (used to generate stroke color from positive or negative color). * For example, 1.0 = same color and 0.5 is 1/2 of the intensity of the source fill color. */ strokeIntensity: number; /** * Gets or sets the color used when the closing value is greater than opening value or * for buying volume. */ positiveColor: OxyColor; /** * Gets or sets the fill color used when the closing value is less than opening value or * for selling volume. */ negativeColor: OxyColor; /** * Gets or sets the stroke color of the Y=0 intercept. */ interceptColor: OxyColor; /** * Gets or sets the thickness of the Y=0 intercept. */ interceptStrokeThickness: number; /** * Gets or sets the line style of the Y=0 intercept. */ interceptLineStyle: LineStyle; /** * Gets or sets a value indicating whether positive bars are shown as filled (false) or hollow (true) candlesticks. */ positiveHollow: boolean; /** * Gets or sets a value indicating whether negative bars are shown as filled (false) or hollow (true) candlesticks. */ negativeHollow: boolean; /** * Gets or sets the bar width in data units (for example if the X axis is date/time based, then should * use the difference of DateTimeAxis.toDouble(date) to indicate the width). By default, candlestick * series will use 0.80 x the minimum difference in data points. */ barWidth: number; /** * Gets or sets the minimum volume seen in the data series. */ protected minimumVolume: number; /** * Gets or sets the maximum volume seen in the data series. */ protected maximumVolume: number; /** * Gets or sets the average volume seen in the data series. */ protected averageVolume: number; /** * Append a bar to the series (must be in X order) * @param bar The Bar. */ append(bar: OhlcvItem): void; /** * Renders the series on the specified render context. * @param rc The render context. */ render(rc: IRenderContext): Promise; protected getBuyBarRect(bar: OhlcvItem): OxyRect; protected getSellBarRect(bar: OhlcvItem): OxyRect; /** * Renders the legend symbol for the series on the specified rendering context. * @param rc The rendering context. * @param legendBox The bounding rectangle of the legend box. */ renderLegend(rc: IRenderContext, legendBox: OxyRect): Promise; /** * Gets the point on the series that is nearest the specified point. * @param point The point. * @param interpolate Interpolate the series if this flag is set to true. * @returns A TrackerHitResult for the current hit. */ getNearestPoint(point: ScreenPoint, interpolate: boolean): TrackerHitResult | undefined; /** * Updates the data. * @internal */ updateData(): void; /** * Updates the axes to include the max and min of this series. * @internal */ updateAxisMaxMin(): void; /** * Updates the maximum and minimum values of the series. * @internal */ updateMaxMin(): void; getJsonIgnoreProperties(): string[]; protected getElementDefaultValues(): any; toJSON(opt?: PlotModelSerializeOptions): any; } //# sourceMappingURL=VolumeSeries.d.ts.map