lightweight-charts
Advanced tools
Comparing version 1.0.2 to 1.1.0
@@ -95,3 +95,6 @@ /** | ||
export declare type PriceAxisPosition = 'left' | 'right' | 'none'; | ||
export declare type PriceFormat = PriceFormatBuiltIn | PriceFormatCustom; | ||
export declare type PriceFormatterFn = (priceValue: BarPrice) => string; | ||
export declare type SeriesMarkerPosition = 'aboveBar' | 'belowBar' | 'inBar'; | ||
export declare type SeriesMarkerShape = 'circle' | 'square' | 'arrowUp' | 'arrowDown'; | ||
export declare type SeriesOptions<T> = (T & SeriesOptionsCommon & OverlaySeriesSpecificOptions) | (T & SeriesOptionsCommon & NonOverlaySeriesSpecificOptions); | ||
@@ -411,2 +414,7 @@ export declare type SeriesPartialOptions<T> = (DeepPartial<T & SeriesOptionsCommon> & OverlaySeriesSpecificOptions) | (DeepPartial<T & SeriesOptionsCommon> & NonOverlaySeriesSpecificOptions); | ||
update(bar: SeriesDataItemTypeMap[TSeriesType]): void; | ||
/** | ||
* Sets markers for the series | ||
* @param data array of series markers. This array should be sorted by time. Several markers with same time are allowed. | ||
*/ | ||
setMarkers(data: SeriesMarker<Time>[]): void; | ||
} | ||
@@ -511,2 +519,4 @@ /** Interface to chart time scale */ | ||
seriesPrices: Map<ISeriesApi<SeriesType>, BarPrice | BarPrices>; | ||
hoveredSeries?: ISeriesApi<SeriesType>; | ||
hoveredMarkerId?: SeriesMarker<Time>['id']; | ||
} | ||
@@ -533,3 +543,3 @@ export interface NonOverlaySeriesSpecificOptions { | ||
*/ | ||
export interface PriceFormat { | ||
export interface PriceFormatBuiltIn { | ||
/** | ||
@@ -552,2 +562,13 @@ * Enum of possible modes of price formatting | ||
} | ||
export interface PriceFormatCustom { | ||
type: 'custom'; | ||
/** | ||
* User-defined function for price formatting that could be used for some specific cases, that could not be covered with PriceFormatBuiltIn | ||
*/ | ||
formatter: PriceFormatterFn; | ||
/** | ||
* Minimal step of the price. | ||
*/ | ||
minMove: number; | ||
} | ||
/** Defines margins of the price scale */ | ||
@@ -588,2 +609,9 @@ export interface PriceScaleMargins { | ||
} | ||
export interface SeriesMarker<TimeType> { | ||
time: TimeType; | ||
position: SeriesMarkerPosition; | ||
shape: SeriesMarkerShape; | ||
color: string; | ||
id?: string; | ||
} | ||
/** | ||
@@ -590,0 +618,0 @@ * Structure describing options common for all types of series |
{ | ||
"version": "1.0.2", | ||
"version": "1.1.0", | ||
"name": "lightweight-charts", | ||
@@ -4,0 +4,0 @@ "author": "TradingView, Inc.", |
@@ -13,3 +13,3 @@ <!-- markdownlint-disable no-inline-html first-line-h1 --> | ||
[![npm bundle size][bundle-size-img]][bundle-size-link] | ||
![Zero dependencies][zero-deps-img] | ||
[![Dependencies count][deps-count-img]][bundle-size-link] | ||
[![Downloads][npm-downloads-img]][npm-link] | ||
@@ -107,4 +107,3 @@ </div> | ||
[bundle-size-img]: https://badgen.net/bundlephobia/minzip/lightweight-charts | ||
[deps-count-img]: https://img.shields.io/badge/dynamic/json.svg?label=dependecies&color=brightgreen&query=$.dependencyCount&uri=https%3A%2F%2Fbundlephobia.com%2Fapi%2Fsize%3Fpackage%3Dlightweight-charts | ||
[bundle-size-link]: https://bundlephobia.com/result?p=lightweight-charts | ||
[zero-deps-img]: https://badgen.net/badge/dependencies/0/green |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1357348
23770
108