Release v30.2.0 (from 889635ab5e3bd31aa685c07ac870cfe4d0f7caca)
This commit is contained in:
77
charting_library/charting_library.d.ts
vendored
77
charting_library/charting_library.d.ts
vendored
@@ -2124,6 +2124,9 @@ export interface BrokerConfigFlags {
|
||||
* Enables brackets for individual positions: take-profit and stop-loss orders.
|
||||
* If you set this flag to `true`, the library displays an _Edit_ button for individual positions and _Edit position..._ in the individual position's context menu.
|
||||
* This flag requires the {@link IBrokerTerminal.editIndividualPositionBrackets} method to be implemented.
|
||||
*
|
||||
* Ensure {@link BrokerConfigFlags.supportPositionBrackets} is set to `false`.
|
||||
* If `supportPositionBrackets` is enabled, it takes precedence, and individual positions will not be displayed on the chart.
|
||||
* @default false
|
||||
*/
|
||||
supportIndividualPositionBrackets?: boolean;
|
||||
@@ -11402,22 +11405,22 @@ export interface IChartWidgetApi {
|
||||
*/
|
||||
exportData(options?: Partial<ExportDataOptions>): Promise<ExportedData>;
|
||||
/**
|
||||
* Enable or disable drag-to-export feature.
|
||||
* Enable or disable [drag-to-export feature](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Chart#enable-drag-to-export-feature).
|
||||
*
|
||||
* **Example**
|
||||
* ```javascript
|
||||
* // Enable drag-to-export, disable default chart drag to scroll
|
||||
* widget.activeChart().setDragExportEnabled(true);
|
||||
* widget.subscribe('dragstart', (params) => {
|
||||
* // create a HTML element for drag image
|
||||
* const dragImage = createDragImage();
|
||||
* // set drag image
|
||||
* params.setDragImage(dragImage, 0, 0);
|
||||
* const exportData = widget.activeChart().exportData();
|
||||
* // transform export data to csv
|
||||
* const csvData = transformExportDataToCsv(exportData);
|
||||
* params.setData('text/plain', csvData);
|
||||
* });
|
||||
* // create a HTML element for drag image
|
||||
* const dragImage = createDragImage();
|
||||
* // set drag image
|
||||
* params.setDragImage(dragImage, 0, 0);
|
||||
* const exportData = widget.activeChart().exportData();
|
||||
* // transform export data to csv
|
||||
* const csvData = transformExportDataToCsv(exportData);
|
||||
* params.setData('text/plain', csvData);
|
||||
* });
|
||||
* ```
|
||||
* To implement drag-to-export, you need to handle the `dragstart` event in your application and set the data to the `dataTransfer` object.
|
||||
* @param enabled `true` to enable drag-to-export, `false` to disable.
|
||||
@@ -12600,6 +12603,19 @@ export interface IDatafeedChartApi {
|
||||
* @param searchSource The source of the search ({@link SearchInitiationPoint}).
|
||||
*/
|
||||
searchSymbols(userInput: string, exchange: string, symbolType: string, onResult: SearchSymbolsCallback, searchSource?: SearchInitiationPoint): void;
|
||||
/**
|
||||
* Provides a list of symbols that match the user's search query.
|
||||
*
|
||||
* Optional. If defined, the library uses this method instead of the non-paginated `searchSymbols`.
|
||||
*
|
||||
* Use the `start` property from `options` to determine which "page" of results to return.
|
||||
* For example, if the first call returns 50 results with 10 remaining, the second call will have `start` set to `50`.
|
||||
* When no more results are available on the server, set the `symbolsRemaining` parameter of the callback to `0`.
|
||||
*
|
||||
* @param options Object containing the user input, exchange, symbol type, and search source ({@link SearchInitiationPoint}).
|
||||
* @param onResult Callback function that returns an array of results ({@link SearchSymbolResultItem}) or an empty array if no symbols are found.
|
||||
*/
|
||||
searchSymbolsPaginated?(options: SymbolSearchPaginatedOptions, onResult: SearchSymbolsPaginatedCallback): void;
|
||||
/**
|
||||
* The library will call this function when it needs to get SymbolInfo by symbol name.
|
||||
*
|
||||
@@ -13064,7 +13080,7 @@ export interface IMenuItem {
|
||||
/** Menu item type */
|
||||
readonly type: MenuItemType;
|
||||
/**
|
||||
* An unique ID of an action item. Could be used to distinguish actions between each other.
|
||||
* A unique ID of an action item.
|
||||
*/
|
||||
readonly id: string;
|
||||
}
|
||||
@@ -20002,7 +20018,7 @@ export interface ScriptContext {
|
||||
}
|
||||
/**
|
||||
* [Symbol Search](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Symbol-Search) result item.
|
||||
* Pass the resulting array of symbols as a parameter to {@link SearchSymbolsCallback} of the [`searchSymbols`](https://www.tradingview.com/charting-library-docs/latest/connecting_data/datafeed-api/required-methods#searchsymbols) method.
|
||||
* Pass the resulting array to the callback for [`searchSymbols`](https://www.tradingview.com/charting-library-docs/latest/connecting_data/datafeed-api/required-methods#searchsymbols) or [`searchSymbolsPaginated`](https://www.tradingview.com/charting-library-docs/latest/connecting_data/datafeed-api/additional-methods#searchsymbolspaginated).
|
||||
*
|
||||
* @example
|
||||
* ```
|
||||
@@ -21055,6 +21071,8 @@ export interface StudyInputBaseInfo {
|
||||
readonly isHidden?: boolean;
|
||||
/** Is the input visible */
|
||||
readonly visible?: string;
|
||||
/** Is the input always visible in the legend, even when the user hides indicator inputs in the legend */
|
||||
readonly isAlwaysShownInLegend?: boolean;
|
||||
/** An array of plot ids, upon the hiding of which, this input should also be hidden within the legend */
|
||||
readonly hideWhenPlotsHidden?: string[];
|
||||
/** Whether the input should be rendered based on user inputs */
|
||||
@@ -27190,6 +27208,31 @@ export interface SymbolSearchCompleteData {
|
||||
*/
|
||||
name: string;
|
||||
}
|
||||
/**
|
||||
* Options that define paginated [Symbol Search](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Symbol-Search) requests.
|
||||
*/
|
||||
export interface SymbolSearchPaginatedOptions {
|
||||
/**
|
||||
* The requested exchange. An empty value means no filter is specified.
|
||||
*/
|
||||
exchange: string;
|
||||
/**
|
||||
* Text entered by the user in the Symbol Search field.
|
||||
*/
|
||||
userInput: string;
|
||||
/**
|
||||
* The number of results to skip, representing how many have already been returned for the same input.
|
||||
*/
|
||||
start?: number;
|
||||
/**
|
||||
* Type of symbol. An empty value means no filter is specified.
|
||||
*/
|
||||
symbolType: string;
|
||||
/**
|
||||
* The source of the search ({@link SearchInitiationPoint}).
|
||||
*/
|
||||
searchSource?: SearchInitiationPoint;
|
||||
}
|
||||
export interface SymbolSpecificTradingOptions {
|
||||
/** Array of strings with valid duration values. You can check that in Order Ticket. */
|
||||
allowedDurations?: string[];
|
||||
@@ -29548,7 +29591,7 @@ export type ChartingLibraryFeatureset =
|
||||
"long_press_floating_tooltip" |
|
||||
/**
|
||||
* Enables chart drag event handling.
|
||||
* See {@link IChartWidgetApi.setDragExportEnabled} and {@link SubscribeEventsMap.dragstart} for more implementation details.
|
||||
* See [Enable drag-to-export feature](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Chart#enable-drag-to-export-feature) for more implementation details.
|
||||
* @default false
|
||||
*/
|
||||
"chart_drag_export" |
|
||||
@@ -29864,6 +29907,7 @@ export type ResolveCallback = (symbolInfo: LibrarySymbolInfo) => void;
|
||||
/** RSS news feed. */
|
||||
export type RssNewsFeedItem = RssNewsFeedInfo | RssNewsFeedInfo[];
|
||||
export type SearchSymbolsCallback = (items: SearchSymbolResultItem[]) => void;
|
||||
export type SearchSymbolsPaginatedCallback = (items: SearchSymbolResultItem[], symbolsRemaining: number) => void;
|
||||
/** An event related to the series. Currently the only possible value for this argument is `price_scale_changed` */
|
||||
export type SeriesEventType = "price_scale_changed";
|
||||
export type SeriesFormat = "price" | "volume";
|
||||
@@ -30110,7 +30154,12 @@ export type TradingTerminalFeatureset = ChartingLibraryFeatureset |
|
||||
* Enables cross-tab synchronization for [watchlists](https://www.tradingview.com/charting-library-docs/latest/trading_terminal/Watch-List).
|
||||
* @default true
|
||||
*/
|
||||
"watchlist_cross_tab_sync";
|
||||
"watchlist_cross_tab_sync" |
|
||||
/**
|
||||
* Enables the DOM widget's static mode.
|
||||
* @default false
|
||||
*/
|
||||
"static_dom";
|
||||
export type VisiblePlotsSet = "ohlcv" | "ohlc" | "c" | "hlc";
|
||||
export type WatchListSymbolListAddedCallback = (listId: string, symbols: string[]) => void;
|
||||
export type WatchListSymbolListChangedCallback = (listId: string) => void;
|
||||
|
||||
Reference in New Issue
Block a user