DXcharts is highly customizable. Use the ChartConfig object to define the initial chart properties during setup.
FullChartConfig
The main configuration file for chart-core.
Includes all components' configurations, global configs like dateFormatter, and colors.Controls how chart series are positioned horizontally and vertically.
Other configurations like: inverse, lockRatio etc.
ChartScale
Auto scale will always fit whole chart series in viewport.
boolean
True - will zoom to cursor on mouse wheel. False - zoom to last candle.
boolean
Locks the ratio between price/time, so when zooming it will feel like google maps.
boolean
Inverses the Y scale vertically.
boolean
Do auto scale (even if it's not enabled in config) after instrument change.
boolean
When dragging chart under specific angle - will automatically disable auto-scale.
AutoScaleDisableOnDrag
The angle of mouse movement. Default - Math.PI / 9.
number
Distance that mouse should travel vertically in px. Default - 80.
number
{
/**
* Value is related to zoom event (zooming chart via mouse wheel)
* 0..1 ratio of full viewport; 0.5 = middle, 0.75 = 3/4 of viewport
* This value is also related to touchpad.
* Touchpad sensitivity is dynamic, and based on delta distance event:
* - if distance is small, zoom sencitivity is minimal, which allows you to zoom in/out on the chart and view each candle in details
* - if distance is big, zoom sencitivity is becomes close to the config value below, which allows you to zoom in/out on the chart and quickly change zoom with big sensitivity
*/
wheel: number;
}
Defines how much items (candles) will be in viewport when chart applies basic scale
number
Adjust x viewport when y-axis width is changed, so x zoom remains the same
boolean
Disable all scale process animations
boolean
Group of component configurations. Chart component is a single visual object on chart.
Examples: chart itself, events, x-axis, highlights, cross tool.
ChartComponents
ChartConfigComponentsChart
The type of chart. Candle, bar, area and others.
keyof BarTypes
Shows the border of candle. Useful for hollow-candles and to increase contrast on thin candles.
boolean
Shows the border for active candle (tapped by finger on mobile devices).
boolean
Shows candle wicks - high and low.
boolean
The minimum amount of candles in viewport. It will not be possible to make fewer than that by using zoom.
number
ChartConfigComponentsHistogram
The maximum amount of Y axis scales on a single chart
number
Background color will be also applied to the chart axes
{
x: boolean;
y: boolean;
}
(candles: Candle[]) => Candle[]
ChartConfigComponentsXAxis
Record<TimeFormatWithDuration, string>
{
top?: number;
bottom?: number;
}
Type of Y axis. Currently supported 'regular', 'percent', 'logarithmic'.
PriceAxisType
Returns a string representation of a string.
() => string
Returns the character at the specified index.
(pos: number) => string
Returns the Unicode value of the character at the specified location.
(index: number) => number
Returns a string that contains the concatenation of two or more strings.
(...strings: string[]) => string
Returns the position of the first occurrence of a substring.
(searchString: string, position?: number) => number
Returns the last occurrence of a substring in the string.
(searchString: string, position?: number) => number
Determines whether two strings are equivalent in the current locale.
Determines whether two strings are equivalent in the current or specified locale.
{ (that: string): number; (that: string, locales?: string | string[], options?: CollatorOptions): number; (that: string, locales?: LocalesArgument, options?: CollatorOptions): number; }
Matches a string with a regular expression, and returns an array containing the results of that search.
Matches a string or an object that supports being matched against, and returns an array
containing the results of that search, or null if no matches are found.
{ (regexp: string | RegExp): RegExpMatchArray; (matcher: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray; }
Replaces text in a string, using a regular expression or search string.
Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm.
Replaces text in a string, using an object that supports replacement within a string.
{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { ...; }, replaceValue: string): string; (searchValue: { ...; }, replacer: (substring: string, ...args: any[]) => string): string; }
Finds the first substring match in a regular expression search.
{ (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }
Returns a section of a string.
(start?: number, end?: number) => string
Split a string into substrings using the specified separator and return them as an array.
{ (separator: string | RegExp, limit?: number): string[]; (splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; }
Returns the substring at the specified location within a String object.
(start: number, end?: number) => string
Converts all the alphabetic characters in a string to lowercase.
() => string
Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.
{ (locales?: string | string[]): string; (locales?: LocalesArgument): string; }
Converts all the alphabetic characters in a string to uppercase.
() => string
Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.
{ (locales?: string | string[]): string; (locales?: LocalesArgument): string; }
Removes the leading and trailing white space and line terminator characters from a string.
() => string
Returns the length of a String object.
number
Gets a substring beginning at the specified location and having the specified length.
(from: number, length?: number) => string
Returns the primitive value of the specified object.
() => string
Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
value of the UTF-16 encoded code point starting at the string element at position pos in
the String resulting from converting this object to a String.
If there is no element at that position, the result is undefined.
If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
(pos: number) => number
Returns true if searchString appears as a substring of the result of converting this
object to a String, at one or more positions that are
greater than or equal to position; otherwise, returns false.
(searchString: string, position?: number) => boolean
Returns true if the sequence of elements of searchString converted to a String is the
same as the corresponding elements of this object (converted to a String) starting at
endPosition – length(this). Otherwise returns false.
(searchString: string, endPosition?: number) => boolean
Returns the String value result of normalizing the string into the normalization form
named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
{ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; (form?: string): string; }
Returns a String value that is made from count copies appended together. If count is 0,
the empty string is returned.
(count: number) => string
Returns true if the sequence of elements of searchString converted to a String is the
same as the corresponding elements of this object (converted to a String) starting at
position. Otherwise returns false.
(searchString: string, position?: number) => boolean
Returns an `<a>` HTML anchor element and sets the name attribute to the text value
(name: string) => string
Returns a `<big>` HTML element
() => string
Returns a `<blink>` HTML element
() => string
Returns a `<b>` HTML element
() => string
Returns a `<tt>` HTML element
() => string
Returns a `<font>` HTML element and sets the color attribute value
(color: string) => string
Returns a `<font>` HTML element and sets the size attribute value
{ (size: number): string; (size: string): string; }
Returns an `<i>` HTML element
() => string
Returns an `<a>` HTML element and sets the href attribute value
(url: string) => string
Returns a `<small>` HTML element
() => string
Returns a `<strike>` HTML element
() => string
Returns a `<sub>` HTML element
() => string
Returns a `<sup>` HTML element
() => string
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
The padding is applied from the start (left) of the current string.
(maxLength: number, fillString?: string) => string
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
The padding is applied from the end (right) of the current string.
(maxLength: number, fillString?: string) => string
Removes the trailing white space and line terminator characters from a string.
() => string
Removes the leading white space and line terminator characters from a string.
() => string
Removes the leading white space and line terminator characters from a string.
() => string
Removes the trailing white space and line terminator characters from a string.
() => string
Matches a string with a regular expression, and returns an iterable of matches
containing the results of that search.
(regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
Iterator
() => StringIterator<string>
Align Y axis left or right.
YAxisAlign
Returns a string representation of a string.
() => string
Returns the character at the specified index.
(pos: number) => string
Returns the Unicode value of the character at the specified location.
(index: number) => number
Returns a string that contains the concatenation of two or more strings.
(...strings: string[]) => string
Returns the position of the first occurrence of a substring.
(searchString: string, position?: number) => number
Returns the last occurrence of a substring in the string.
(searchString: string, position?: number) => number
Determines whether two strings are equivalent in the current locale.
Determines whether two strings are equivalent in the current or specified locale.
{ (that: string): number; (that: string, locales?: string | string[], options?: CollatorOptions): number; (that: string, locales?: LocalesArgument, options?: CollatorOptions): number; }
Matches a string with a regular expression, and returns an array containing the results of that search.
Matches a string or an object that supports being matched against, and returns an array
containing the results of that search, or null if no matches are found.
{ (regexp: string | RegExp): RegExpMatchArray; (matcher: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray; }
Replaces text in a string, using a regular expression or search string.
Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm.
Replaces text in a string, using an object that supports replacement within a string.
{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { ...; }, replaceValue: string): string; (searchValue: { ...; }, replacer: (substring: string, ...args: any[]) => string): string; }
Finds the first substring match in a regular expression search.
{ (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }
Returns a section of a string.
(start?: number, end?: number) => string
Split a string into substrings using the specified separator and return them as an array.
{ (separator: string | RegExp, limit?: number): string[]; (splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; }
Returns the substring at the specified location within a String object.
(start: number, end?: number) => string
Converts all the alphabetic characters in a string to lowercase.
() => string
Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.
{ (locales?: string | string[]): string; (locales?: LocalesArgument): string; }
Converts all the alphabetic characters in a string to uppercase.
() => string
Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.
{ (locales?: string | string[]): string; (locales?: LocalesArgument): string; }
Removes the leading and trailing white space and line terminator characters from a string.
() => string
Returns the length of a String object.
number
Gets a substring beginning at the specified location and having the specified length.
(from: number, length?: number) => string
Returns the primitive value of the specified object.
() => string
Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
value of the UTF-16 encoded code point starting at the string element at position pos in
the String resulting from converting this object to a String.
If there is no element at that position, the result is undefined.
If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
(pos: number) => number
Returns true if searchString appears as a substring of the result of converting this
object to a String, at one or more positions that are
greater than or equal to position; otherwise, returns false.
(searchString: string, position?: number) => boolean
Returns true if the sequence of elements of searchString converted to a String is the
same as the corresponding elements of this object (converted to a String) starting at
endPosition – length(this). Otherwise returns false.
(searchString: string, endPosition?: number) => boolean
Returns the String value result of normalizing the string into the normalization form
named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
{ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; (form?: string): string; }
Returns a String value that is made from count copies appended together. If count is 0,
the empty string is returned.
(count: number) => string
Returns true if the sequence of elements of searchString converted to a String is the
same as the corresponding elements of this object (converted to a String) starting at
position. Otherwise returns false.
(searchString: string, position?: number) => boolean
Returns an `<a>` HTML anchor element and sets the name attribute to the text value
(name: string) => string
Returns a `<big>` HTML element
() => string
Returns a `<blink>` HTML element
() => string
Returns a `<b>` HTML element
() => string
Returns a `<tt>` HTML element
() => string
Returns a `<font>` HTML element and sets the color attribute value
(color: string) => string
Returns a `<font>` HTML element and sets the size attribute value
{ (size: number): string; (size: string): string; }
Returns an `<i>` HTML element
() => string
Returns an `<a>` HTML element and sets the href attribute value
(url: string) => string
Returns a `<small>` HTML element
() => string
Returns a `<strike>` HTML element
() => string
Returns a `<sub>` HTML element
() => string
Returns a `<sup>` HTML element
() => string
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
The padding is applied from the start (left) of the current string.
(maxLength: number, fillString?: string) => string
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
The padding is applied from the end (right) of the current string.
(maxLength: number, fillString?: string) => string
Removes the trailing white space and line terminator characters from a string.
() => string
Removes the leading white space and line terminator characters from a string.
() => string
Removes the leading white space and line terminator characters from a string.
() => string
Removes the trailing white space and line terminator characters from a string.
() => string
Matches a string with a regular expression, and returns an iterable of matches
containing the results of that search.
(regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
Iterator
() => StringIterator<string>
Configures the labels on Y axis.
YAxisLabels
Settings contains required labels ('lastPrice', 'countDownToBarClose')
and optional labels ('bidAsk', 'highLow', 'prevDayClose', 'prePostMarket').
Record<string, YAxisLabelConfig>
Override appearance of different label types. Useful to change all labels of the same type.
YAxisTypeConfig
The height of the single label in pixels.
Used during calculation step between labels.
You can make it smaller to fit more labels on Y axis. Or less to fit less labels.
number
Always show zero line for percent scale.
boolean
Allow to scale chart vertically by dragging Y axis with mouse.
boolean
Allows to double-click on Y axis to turn on auto-scale.
boolean
{
top: number;
bottom: number;
end: number;
start: number;
}
Treasury format for price values (1/32 tick format for bonds)
YAxisConfigTreasuryFormat
Shows vertical grid lines.
boolean
Shows horizontal grid lines.
boolean
Width of grid lines in pixels.
number
Line dash configuration like [1,2].
number[]
ChartConfigComponentsVolumes
Show volumes in overlaying mode or as sub-chart like a study.
boolean
ChartConfigComponentsOffsets
Top offset, measured in percents of chart height.
number
Left offset, measured in amount of candles.
number
Right offset, measured in amount of candles.
number
Bottom offset, measured in percents of chart height.
number
ChartConfigComponentsWaterMark
Position on the screen.
WaterMarkPositionType
Returns a string representation of a string.
() => string
Returns the character at the specified index.
(pos: number) => string
Returns the Unicode value of the character at the specified location.
(index: number) => number
Returns a string that contains the concatenation of two or more strings.
(...strings: string[]) => string
Returns the position of the first occurrence of a substring.
(searchString: string, position?: number) => number
Returns the last occurrence of a substring in the string.
(searchString: string, position?: number) => number
Determines whether two strings are equivalent in the current locale.
Determines whether two strings are equivalent in the current or specified locale.
{ (that: string): number; (that: string, locales?: string | string[], options?: CollatorOptions): number; (that: string, locales?: LocalesArgument, options?: CollatorOptions): number; }
Matches a string with a regular expression, and returns an array containing the results of that search.
Matches a string or an object that supports being matched against, and returns an array
containing the results of that search, or null if no matches are found.
{ (regexp: string | RegExp): RegExpMatchArray; (matcher: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray; }
Replaces text in a string, using a regular expression or search string.
Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm.
Replaces text in a string, using an object that supports replacement within a string.
{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { ...; }, replaceValue: string): string; (searchValue: { ...; }, replacer: (substring: string, ...args: any[]) => string): string; }
Finds the first substring match in a regular expression search.
{ (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }
Returns a section of a string.
(start?: number, end?: number) => string
Split a string into substrings using the specified separator and return them as an array.
{ (separator: string | RegExp, limit?: number): string[]; (splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; }
Returns the substring at the specified location within a String object.
(start: number, end?: number) => string
Converts all the alphabetic characters in a string to lowercase.
() => string
Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.
{ (locales?: string | string[]): string; (locales?: LocalesArgument): string; }
Converts all the alphabetic characters in a string to uppercase.
() => string
Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.
{ (locales?: string | string[]): string; (locales?: LocalesArgument): string; }
Removes the leading and trailing white space and line terminator characters from a string.
() => string
Returns the length of a String object.
number
Gets a substring beginning at the specified location and having the specified length.
(from: number, length?: number) => string
Returns the primitive value of the specified object.
() => string
Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
value of the UTF-16 encoded code point starting at the string element at position pos in
the String resulting from converting this object to a String.
If there is no element at that position, the result is undefined.
If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
(pos: number) => number
Returns true if searchString appears as a substring of the result of converting this
object to a String, at one or more positions that are
greater than or equal to position; otherwise, returns false.
(searchString: string, position?: number) => boolean
Returns true if the sequence of elements of searchString converted to a String is the
same as the corresponding elements of this object (converted to a String) starting at
endPosition – length(this). Otherwise returns false.
(searchString: string, endPosition?: number) => boolean
Returns the String value result of normalizing the string into the normalization form
named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
{ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; (form?: string): string; }
Returns a String value that is made from count copies appended together. If count is 0,
the empty string is returned.
(count: number) => string
Returns true if the sequence of elements of searchString converted to a String is the
same as the corresponding elements of this object (converted to a String) starting at
position. Otherwise returns false.
(searchString: string, position?: number) => boolean
Returns an `<a>` HTML anchor element and sets the name attribute to the text value
(name: string) => string
Returns a `<big>` HTML element
() => string
Returns a `<blink>` HTML element
() => string
Returns a `<b>` HTML element
() => string
Returns a `<tt>` HTML element
() => string
Returns a `<font>` HTML element and sets the color attribute value
(color: string) => string
Returns a `<font>` HTML element and sets the size attribute value
{ (size: number): string; (size: string): string; }
Returns an `<i>` HTML element
() => string
Returns an `<a>` HTML element and sets the href attribute value
(url: string) => string
Returns a `<small>` HTML element
() => string
Returns a `<strike>` HTML element
() => string
Returns a `<sub>` HTML element
() => string
Returns a `<sup>` HTML element
() => string
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
The padding is applied from the start (left) of the current string.
(maxLength: number, fillString?: string) => string
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
The padding is applied from the end (right) of the current string.
(maxLength: number, fillString?: string) => string
Removes the trailing white space and line terminator characters from a string.
() => string
Removes the leading white space and line terminator characters from a string.
() => string
Removes the leading white space and line terminator characters from a string.
() => string
Removes the trailing white space and line terminator characters from a string.
() => string
Matches a string with a regular expression, and returns an iterable of matches
containing the results of that search.
(regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
Iterator
() => StringIterator<string>
Font size for first text line.
number
Padding after first text line.
number
Font size for second text line.
number
Padding after second text line.
number
Font size for third text line.
number
Padding after third text line.
number
ChartConfigComponentsEvents
Toggle events visibility.
boolean
Toggle specific event type visibility (for example: dividends, splits, earnings).
Record<EventType, boolean>
Height of events area in pixels
number
Configure events cursor type.
string
Configure x axis labels
DateTimeFormatConfig[]
Configure icons, the format is string which contains svg tag, for example:
'<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M1.06066 6.5L6.5 1.06066L11.9393 6.5L6.5 11.9393L1.06066 6.5Z" stroke="#D92C40" stroke-width="1.5"/>
</svg>'
ChartConfigComponentsEventsIcons
Configure the event type vertical line appearance
ChartConfigComponentsEventsLine
{ width: number; dash: Array<number> }
{ width: number; dash: Array<number> }
{ width: number; dash: Array<number> }
{ width: number; dash: Array<number> }
ChartConfigComponentsHighLow
Font config of high/low labels.
string
{ high: string; low: string }
ChartConfigComponentsCrossTool
The type of cross tool. Visibility is also contolled by type, set 'none' to hide the cross tool.
string
Line dash for cross tool.
number[]
When discrete is ON - the cross tool X coordinate will always be at the middle of candle.
boolean
Cross tool Y coordinate can magnet to OHLC values of candle.
MagnetTarget
Returns a string representation of a string.
() => string
Returns the character at the specified index.
(pos: number) => string
Returns the Unicode value of the character at the specified location.
(index: number) => number
Returns a string that contains the concatenation of two or more strings.
(...strings: string[]) => string
Returns the position of the first occurrence of a substring.
(searchString: string, position?: number) => number
Returns the last occurrence of a substring in the string.
(searchString: string, position?: number) => number
Determines whether two strings are equivalent in the current locale.
Determines whether two strings are equivalent in the current or specified locale.
{ (that: string): number; (that: string, locales?: string | string[], options?: CollatorOptions): number; (that: string, locales?: LocalesArgument, options?: CollatorOptions): number; }
Matches a string with a regular expression, and returns an array containing the results of that search.
Matches a string or an object that supports being matched against, and returns an array
containing the results of that search, or null if no matches are found.
{ (regexp: string | RegExp): RegExpMatchArray; (matcher: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray; }
Replaces text in a string, using a regular expression or search string.
Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm.
Replaces text in a string, using an object that supports replacement within a string.
{ (searchValue: string | RegExp, replaceValue: string): string; (searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string; (searchValue: { ...; }, replaceValue: string): string; (searchValue: { ...; }, replacer: (substring: string, ...args: any[]) => string): string; }
Finds the first substring match in a regular expression search.
{ (regexp: string | RegExp): number; (searcher: { [Symbol.search](string: string): number; }): number; }
Returns a section of a string.
(start?: number, end?: number) => string
Split a string into substrings using the specified separator and return them as an array.
{ (separator: string | RegExp, limit?: number): string[]; (splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; }
Returns the substring at the specified location within a String object.
(start: number, end?: number) => string
Converts all the alphabetic characters in a string to lowercase.
() => string
Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.
{ (locales?: string | string[]): string; (locales?: LocalesArgument): string; }
Converts all the alphabetic characters in a string to uppercase.
() => string
Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.
{ (locales?: string | string[]): string; (locales?: LocalesArgument): string; }
Removes the leading and trailing white space and line terminator characters from a string.
() => string
Returns the length of a String object.
number
Gets a substring beginning at the specified location and having the specified length.
(from: number, length?: number) => string
Returns the primitive value of the specified object.
() => string
Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
value of the UTF-16 encoded code point starting at the string element at position pos in
the String resulting from converting this object to a String.
If there is no element at that position, the result is undefined.
If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
(pos: number) => number
Returns true if searchString appears as a substring of the result of converting this
object to a String, at one or more positions that are
greater than or equal to position; otherwise, returns false.
(searchString: string, position?: number) => boolean
Returns true if the sequence of elements of searchString converted to a String is the
same as the corresponding elements of this object (converted to a String) starting at
endPosition – length(this). Otherwise returns false.
(searchString: string, endPosition?: number) => boolean
Returns the String value result of normalizing the string into the normalization form
named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
{ (form: "NFC" | "NFD" | "NFKC" | "NFKD"): string; (form?: string): string; }
Returns a String value that is made from count copies appended together. If count is 0,
the empty string is returned.
(count: number) => string
Returns true if the sequence of elements of searchString converted to a String is the
same as the corresponding elements of this object (converted to a String) starting at
position. Otherwise returns false.
(searchString: string, position?: number) => boolean
Returns an `<a>` HTML anchor element and sets the name attribute to the text value
(name: string) => string
Returns a `<big>` HTML element
() => string
Returns a `<blink>` HTML element
() => string
Returns a `<b>` HTML element
() => string
Returns a `<tt>` HTML element
() => string
Returns a `<font>` HTML element and sets the color attribute value
(color: string) => string
Returns a `<font>` HTML element and sets the size attribute value
{ (size: number): string; (size: string): string; }
Returns an `<i>` HTML element
() => string
Returns an `<a>` HTML element and sets the href attribute value
(url: string) => string
Returns a `<small>` HTML element
() => string
Returns a `<strike>` HTML element
() => string
Returns a `<sub>` HTML element
() => string
Returns a `<sup>` HTML element
() => string
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
The padding is applied from the start (left) of the current string.
(maxLength: number, fillString?: string) => string
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length.
The padding is applied from the end (right) of the current string.
(maxLength: number, fillString?: string) => string
Removes the trailing white space and line terminator characters from a string.
() => string
Removes the leading white space and line terminator characters from a string.
() => string
Removes the leading white space and line terminator characters from a string.
() => string
Removes the trailing white space and line terminator characters from a string.
() => string
Matches a string with a regular expression, and returns an iterable of matches
containing the results of that search.
(regexp: RegExp) => RegExpStringIterator<RegExpExecArray>
Iterator
() => StringIterator<string>
Format of X label config for different periods.
DateTimeFormatConfig[]
X label appearance.
{
padding: {
top: number;
bottom: number;
right: number;
left: number;
};
margin: {
top: number;
bottom?: number; // TODO remove
};
}
X label appearance.
{
padding: {
top: number;
bottom: number;
end: number;
start: number;
};
type: YAxisLabelAppearanceType;
}
ChartConfigComponentsHighlights
Border of highlights (session breaks for example).
{
width: number;
dash: [number, number];
}
ChartConfigComponentsNavigationMap
{
visible: boolean;
dateFormat: string;
fontFamily: string;
fontSize: number;
padding: {
x: number;
y: number;
};
}
{
chart: CursorType;
buttonLeft: CursorType;
buttonRight: CursorType;
leftResizer: CursorType;
rightResizer: CursorType;
slider: CursorType;
}
{
height: number;
width: number;
border: number;
lineWidth: number;
}
ChartConfigComponentsBaseline
Horizontal resizer between panes
ChartConfigComponentsPaneResizer
Height of resizer in pixels.
number
Make the horizontal line fixed and disable resizing.
boolean
Hover area of resizer in pixels.
number
All colors in chart-core are configured here.
FullChartColors
backgroundGradientTopColor
string
backgroundGradientBottomColor
string
Record<"AFTER_MARKET" | "PRE_MARKET" | "NO_TRADING" | "REGULAR", HighlightsColors>
{
firstRowColor: string;
secondRowColor: string;
thirdRowColor: string;
}
{
highColor: string;
lowColor: string;
}
{
backgroundColor: string;
zeroPercentLine: string;
labelTextColor: string;
labelInvertedTextColor: string;
labelBoxColor: string;
rectLabelTextColor: string;
rectLabelInvertedTextColor: string;
}
{
backgroundColor: string;
labelTextColor: string;
}
{
lineColor: string;
labelBoxColor: string;
labelTextColor: string;
}
ChartConfigComponentsEventsColors
{
buttonColor: string;
knotColor: string;
sliderColor: string;
backgroundColor: string;
buttonArrowColor: string;
knotLineColor: string;
knotBorderColor: string;
timeLabelsTextColor: string;
mapFillColor: string;
mapGradientTopColor?: string;
mapGradientBottomColor?: string;
mapColor: string;
}
{
lineColor: string;
bgColor: string;
bgHoverColor: string;
}
YAxisLastPriceLabelColorConfig
YAxisBidAskLabelColorConfig
YAxisHighLowLabelColorConfig
YAxisPrePostMarketLabelColorConfig
Date and time formatting configuration.
DateFormatter
(pattern: string) => string
(pattern: string) => DateTimeFormatter
{
pattern?: string;
test?: (pattern: string) => void;
}
Timezone to use on chart X axis labels and any other timestamps.
Examples: Africa/Accra, Europe/Moscow, Asia/Tehran.
string
If set - chart canvas will have fixed size always.
{
width: number;
height: number;
}
Right to left mode. Used in drawings (like text drawing) calculation.
boolean
Initial visual order of chart drawers. Reorder to put volumes on top of candles for example.
("MAIN_BACKGROUND" | "MAIN_CLEAR" | "HIT_TEST_CLEAR" | "YAXIS_CLEAR" | "SERIES_CLEAR" | "OVER_SERIES_CLEAR" | "HIT_TEST_DRAWINGS" | "GRID" | "X_AXIS" | "Y_AXIS" | "HIGH_LOW" | ... 11 more ... | "CROSS_TOOL")[]