MCPcopy Create free account

hub / github.com/tradingview/lightweight-charts / functions

Functions4,839 in github.com/tradingview/lightweight-charts

↓ 824 callersMethodsetData
* Sets or replaces series data. * * @param data - Ordered (earlier time point goes first) array of data items. Old data is fully replaced with the
src/api/iseries-api.ts:163
↓ 720 callersMethodaddSeries
* Creates a series with specified parameters. * * @param definition - A series definition. * @param options - Customization parameters of the se
src/api/ipane-api.ts:149
↓ 388 callersMethodtimeScale
* Returns API to manipulate the time scale * * @returns Target API
src/api/ichart-api.ts:295
↓ 225 callersMethodapplyOptions
* Applies new options to the chart * * @param options - Any subset of options.
src/api/create-chart.ts:58
↓ 190 callersMethodupdate
* Adds new data item to the existing set (or updates the latest item if times of the passed/latest items are equal). * * @param bar - A single dat
src/api/iseries-api.ts:190
↓ 164 callersMethodfitContent
* Automatically calculates the visible range to fit all data from all series.
src/api/itime-scale-api.ts:95
↓ 132 callersFunctionensureNotNull
(value: T | null)
src/helpers/assertions.ts:39
↓ 102 callersMethodpriceToCoordinate
* Converts specified series price to pixel coordinate according to the series price scale * * @param price - Input price to be converted * @retu
src/api/iseries-api.ts:76
↓ 100 callersMethodpriceScale
()
src/model/iseries.ts:80
↓ 98 callersFunctioncreateChart
(container: string | HTMLElement, options?: Parameters<typeof module.createChart>[1])
website/plugins/enhanced-codeblock/theme/CodeBlock/import-lightweight-charts-version.ts:62
↓ 98 callersMethodget
(scope: BitmapCoordinatesRenderingScope, params: GradientCacheParams)
src/renderers/gradient-style-cache.ts:22
↓ 86 callersFunctiondataItemAt
(time: Time)
tests/unittests/data-layer.spec.ts:42
↓ 84 callersMethodoptions
()
src/model/iseries.ts:78
↓ 75 callersMethodattachPrimitive
* Attaches additional drawing primitive to the pane * * @param primitive - any implementation of IPanePrimitive interface
src/api/ipane-api.ts:61
↓ 71 callersMethodmodel
()
src/gui/chart-widget.ts:52
↓ 70 callersMethodmoveTo
* Moves the pane to a new position. * * @param paneIndex - The target index of the pane. Should be a number between 0 and the total number of pane
src/api/ipane-api.ts:33
↓ 63 callersMethodrestore
()
tests/unittests/text-width-cache.spec.ts:19
↓ 61 callersMethodsave
()
tests/unittests/text-width-cache.spec.ts:17
↓ 58 callersMethodsetSeriesData
(series: Series<TSeriesType>, data: SeriesDataItemTypeMap<HorzScaleItem>[TSeriesType][])
src/model/data-layer.ts:153
↓ 56 callersMethodcreatePriceLine
* Creates a new price line * * @param options - Any subset of options, however `price` is required. * @example * ```js * const priceLine = s
src/api/iseries-api.ts:273
↓ 53 callersMethoddataByIndex
* Returns a bar data by provided logical index. * * @param logicalIndex - Logical index * @param mismatchDirection - Search direction if no data
src/api/iseries-api.ts:216
↓ 53 callersMethodtimeToCoordinate
* Converts a time to local x coordinate. * * @param time - Time needs to be converted * @returns X coordinate of that time or `null` if no time
src/api/itime-scale-api.ts:127
↓ 45 callersFunctioncreateSeriesMock
(seriesType?: T)
tests/unittests/data-layer.spec.ts:21
↓ 44 callersMethodoptions
()
src/gui/chart-widget.ts:54
↓ 43 callersMethodformat
* Formatting function * * @param price - Original price to be formatted * @returns Formatted price
src/formatters/iprice-formatter.ts:9
↓ 41 callersMethoddestroy
()
src/model/idata-source.ts:60
↓ 41 callersMethodremoveSeries
* Removes a series of any type. This is an irreversible operation, you cannot do anything with the series after removing it. * * @example * ```j
src/api/ichart-api.ts:189
↓ 38 callersMethodpanes
* Returns array of panes' API * * @returns array of pane's Api
src/api/ichart-api.ts:332
↓ 35 callersFunctiongenerateAlternativeCandleData
( numberOfPoints: number = 250, startDate: Date )
indicator-examples/src/sample-data.ts:90
↓ 35 callersFunctiontimePoint
(val: number)
tests/unittests/plot-list.spec.ts:12
↓ 34 callersMethodconflateByFactor
( data: readonly SeriesPlotRow<T>[], barsToMerge: number, customReducer?: CustomConflationReducer<HorzSc
src/model/data-conflater.ts:55
↓ 34 callersFunctiongenerateLineData
(count)
tests/e2e/graphics/test-cases/time-scale/conflation-smoothing-factor.js:1
↓ 34 callersMethodmeasureText
(text: string)
tests/unittests/text-width-cache.spec.ts:12
↓ 34 callersMethodsubscribe
(callback: Callback<T1, T2, T3>, linkedObject?: unknown, singleshot?: boolean)
src/helpers/isubscription.ts:4
↓ 34 callersMethodwidth
()
src/model/time-scale.ts:297
↓ 33 callersMethodaddCustomSeries
* Creates a custom series with specified parameters. * * A custom series is a generic series which can be extended with a custom renderer to * i
src/api/ipane-api.ts:133
↓ 33 callersMethodkey
* Returns the key for the specified horizontal scale item. * * @param internalItem - horizontal scale item for which the key should be returned
src/model/ihorz-scale-behavior.ts:77
↓ 33 callersMethodsetVisibleLogicalRange
* Sets visible [logical range](/time-scale.md#logical-range) of data. * * @param range - Target visible logical range of data. * @example * ``
src/api/itime-scale-api.ts:85
↓ 32 callersFunctionplotRow
(index: TimePointIndex, time: TimePoint, value: PlotRowValue)
tests/unittests/plot-list.spec.ts:16
↓ 29 callersMethoddata
* Returns all the bar data for the series. * * @returns Original data items provided via setData or update methods. * @example * ```js * con
src/api/iseries-api.ts:227
↓ 28 callersMethodcoordinateToPrice
* Converts specified coordinate to price value according to the series price scale * * @param coordinate - Input coordinate to be converted * @r
src/api/iseries-api.ts:84
↓ 28 callersMethodisEmpty
()
src/model/time-scale.ts:296
↓ 28 callersMethodtimeScale
()
src/model/chart-model.ts:436
↓ 28 callersMethodunsubscribeAll
(linkedObject: unknown)
src/helpers/isubscription.ts:6
↓ 26 callersFunctionpositionsLine
( positionMedia: number, pixelRatio: number, desiredWidthMedia: number = 1, widthIsBitmap?: boolean )
plugin-examples/src/helpers/dimensions/positions.ts:15
↓ 25 callersMethodfire
(param1: T1, param2: T2, param3: T3)
src/helpers/delegate.ts:32
↓ 25 callersFunctionsize
(barSpacing: number, coeff: number)
src/plugins/series-markers/utils.ts:11
↓ 24 callersMethod_updateData
()
indicator-examples/src/indicators/ratio/ratio-indicator.ts:76
↓ 24 callersMethodpriceFormatter
* Returns current price formatter * * @returns Interface to the price formatter object that can be used to format prices in the same way as the ch
src/api/iseries-api.ts:68
↓ 24 callersMethodseriesOrder
* Gets the zero-based index of this series within the list of all series on the current pane. * * @returns The current index of the series in the
src/api/iseries-api.ts:352
↓ 24 callersMethodseriesType
* Return current series type. * * @returns Type of the series. * @example * ```js * const lineSeries = chart.addSeries(LineSeries); * cons
src/api/iseries-api.ts:305
↓ 23 callersFunctionassert
(condition: boolean, message?: string)
src/helpers/assertions.ts:7
↓ 23 callersMethodfirstValue
()
src/model/iprice-data-source.ts:15
↓ 23 callersFunctiongenerateLineData
(numberOfPoints: number = 500)
plugin-examples/src/sample-data.ts:26
↓ 23 callersMethodlogicalToCoordinate
* Converts a logical index to local x coordinate. * * @param logical - Logical index needs to be converted * @returns x coordinate of that time
src/api/itime-scale-api.ts:103
↓ 23 callersMethodmeasureText
(ctx: CanvasCtxLike, text: string, optimizationReplacementRe?: RegExp)
src/model/text-width-cache.ts:27
↓ 23 callersMethodmodel
()
src/model/iprice-data-source.ts:20
↓ 23 callersMethodsetVisibleRange
* Sets visible range of data. * * Note that this method cannot extrapolate time and will use the only currently existent data. * Thus, for examp
src/api/itime-scale-api.ts:67
↓ 23 callersMethodsubscribeDataChanged
* Subscribe to the data changed event. This event is fired whenever the `update` or `setData` method is evoked * on the series. * * @param handl
src/api/iseries-api.ts:244
↓ 23 callersMethodupdateSeriesData
(series: Series<TSeriesType>, data: SeriesDataItemTypeMap<HorzScaleItem>[TSeriesType], historicalUpdate: boole
src/model/data-layer.ts:247
↓ 22 callersMethodaddPane
* Add a pane to the chart * @param preserveEmptyPane - Whether to preserve the empty pane * @returns The pane API
src/api/ichart-api.ts:325
↓ 22 callersFunctionaddResizeHandler
(window: Window, container: HTMLElement, resize: (width: number, height: number) => void)
website/plugins/enhanced-codeblock/theme/CodeBlock/import-lightweight-charts-version.ts:49
↓ 22 callersFunctionconvertToLineData
(candleData: CandleData[])
indicator-examples/src/sample-data.ts:137
↓ 22 callersMethodmove
()
plugin-examples/src/plugins/delta-tooltip/multi-touch-chart-events.ts:126
↓ 22 callersMethodsearch
(index: TimePointIndex, searchMode: MismatchDirection = MismatchDirection.None)
src/model/plot-list.ts:75
↓ 22 callersMethodstate
()
src/gui/pane-widget.ts:172
↓ 21 callersMethodlength
()
src/model/price-range-impl.ts:49
↓ 21 callersFunctionmerge
(dst: Record<string, any>, ...sources: Record<string, any>[])
src/helpers/strict-type-checks.ts:13
↓ 21 callersMethodsubscribeClick
* Subscribe to the chart click event. * * @param handler - Handler to be called on mouse click. * @example * ```js * function myClickHandler
src/api/ichart-api.ts:208
↓ 21 callersMethodsubscribeCrosshairMove
* Subscribe to the crosshair move event. * * @param handler - Handler to be called on crosshair move. * @example * ```js * function myCrossh
src/api/ichart-api.ts:268
↓ 20 callersMethodgetHTMLElement
* Retrieves the HTML element of the pane. * * @returns The HTML element of the pane or null if pane wasn't created yet.
src/api/ipane-api.ts:54
↓ 20 callersFunctionpositionsBox
( position1Media: number, position2Media: number, pixelRatio: number )
plugin-examples/src/helpers/dimensions/positions.ts:37
↓ 19 callersFunctionensureDefined
(value: T | undefined)
src/helpers/assertions.ts:22
↓ 19 callersFunctionformatDate
(date: Date, format: string, locale: string)
src/formatters/format-date.ts:16
↓ 19 callersFunctiongetSeriesDataCreator
(seriesType: TSeriesType)
src/api/get-series-data-creator.ts:140
↓ 19 callersMethodgetVisibleLogicalRange
* Returns the current visible [logical range](/time-scale.md#logical-range) of the chart as an object with the first and last time points of the logic
src/api/itime-scale-api.ts:74
↓ 19 callersMethodpaneIndex
* Retrieves the index of the pane. * * @returns The index of the pane. It is a number between 0 and the total number of panes - 1.
src/api/ipane-api.ts:40
↓ 19 callersMethodunsubscribeDataChanged
* Unsubscribe a handler that was previously subscribed using {@link subscribeDataChanged}. * * @param handler - Previously subscribed handler *
src/api/iseries-api.ts:255
↓ 18 callersMethodgenerateContrastColors
(background: string)
src/model/colors.ts:122
↓ 18 callersFunctiongenerateRgba
(rgba: SimpleRgba)
tests/unittests/color.spec.ts:9
↓ 18 callersMethodvisible
()
src/model/iseries.ts:77
↓ 17 callersMethod_invalidate
(mask: InvalidateMask)
src/model/chart-model.ts:1245
↓ 17 callersMethodminValue
()
src/model/price-range-impl.ts:41
↓ 17 callersMethodupdate
* This method will be called with the latest data for the renderer to use * during the next paint.
src/model/icustom-series.ts:247
↓ 16 callersMethod_model
()
src/gui/pane-widget.ts:677
↓ 16 callersMethodheight
* Returns a height of the time scale.
src/api/itime-scale-api.ts:145
↓ 15 callersMethodbarSpacing
()
src/model/time-scale.ts:304
↓ 15 callersFunctionclone
(object: T)
src/helpers/strict-type-checks.ts:53
↓ 15 callersMethodlightUpdate
()
src/model/chart-model.ts:449
↓ 15 callersMethodmaxValue
()
src/model/price-range-impl.ts:45
↓ 15 callersMethodscrollToPosition
* Scrolls the chart to the specified position. * * @param position - Target data position * @param animated - Setting this to true makes the cha
src/api/itime-scale-api.ts:33
↓ 14 callersMethodfire
(param1: T1)
plugin-examples/src/helpers/delegate.ts:50
↓ 14 callersMethodtimeToIndex
(time: InternalHorzScaleItem, findNearest: boolean)
src/model/time-scale.ts:302
↓ 13 callersFunctiongenerateBars
(count = 500, startDay = 15)
tests/e2e/memleaks/test-cases/series.js:38
↓ 13 callersMethodgetElement
()
src/gui/pane-widget.ts:202
↓ 13 callersMethodgradientColorAtPercent
( topColor: string, bottomColor: string, percent: number )
src/model/colors.ts:134
↓ 13 callersMethodleft
()
src/model/range-impl.ts:14
↓ 13 callersMethodminMaxOnRangeCached
(start: TimePointIndex, end: TimePointIndex, plots: readonly PlotRowValueIndex[])
src/model/plot-list.ts:91
↓ 12 callersMethod_makeCompatEvent
(event: MouseEvent | TouchEvent, touch?: Touch)
src/gui/mouse-event-handler.ts:798
↓ 12 callersMethodcalculateConflationLevelWithSmoothing
(barSpacing: number, devicePixelRatio: number, smoothingFactor: number)
src/model/data-conflater.ts:40
next →1–100 of 4,839, ranked by callers