PINE LIBRARY
מעודכן Tooltip

Library "Tooltip"
This library helps creating and managing nice looking data (key/value) tooltips that you can use for
labels. The tooltips data key/value will align automatically. It is optional to convert the data to a values only string too.
method addSpacesToKey(this)
Calculates the amount of spaces needed after the key to make it the key least 4 characters wide.
Namespace types: Data
Parameters:
this (Data): (Data) The Data.
method addTabs(this, longestKeyLength)
Calculates the amount of tabs to be used.
Namespace types: Data
Parameters:
this (Data): (Data) The Data.
longestKeyLength (int)
method longestKeyLength(this)
Returns the length of the longest key string in the array.
Namespace types: Data[]
Parameters:
this (Data[]): (Tooltip) The object to work with.
return (int) The length of the key.
method toString(tooltips, withKey)
Helper function for the tooltip.
Namespace types: Data[]
Parameters:
tooltips (Data[])
withKey (bool): (bool) Wether to create a string with keys in it.
return (string) The string
new()
Creates a new array to store tooltip data in
return (Data) The data array.
Data
Key/Value pair for tooltips
Fields:
key (series string)
value (series string)
This library helps creating and managing nice looking data (key/value) tooltips that you can use for
labels. The tooltips data key/value will align automatically. It is optional to convert the data to a values only string too.
method addSpacesToKey(this)
Calculates the amount of spaces needed after the key to make it the key least 4 characters wide.
Namespace types: Data
Parameters:
this (Data): (Data) The Data.
method addTabs(this, longestKeyLength)
Calculates the amount of tabs to be used.
Namespace types: Data
Parameters:
this (Data): (Data) The Data.
longestKeyLength (int)
method longestKeyLength(this)
Returns the length of the longest key string in the array.
Namespace types: Data[]
Parameters:
this (Data[]): (Tooltip) The object to work with.
return (int) The length of the key.
method toString(tooltips, withKey)
Helper function for the tooltip.
Namespace types: Data[]
Parameters:
tooltips (Data[])
withKey (bool): (bool) Wether to create a string with keys in it.
return (string) The string
new()
Creates a new array to store tooltip data in
return (Data) The data array.
Data
Key/Value pair for tooltips
Fields:
key (series string)
value (series string)
הערות שחרור
v2 | Fixed bug where amount of tabs and spaces were calculated incorrectly when the key was shorter than the size of a tab (4 chars)Added:
method fill(this, longestKeyLength)
Calculates the amount of spaces and tabs to align all values.
Namespace types: Data
Parameters:
this (Data): (Data) The Data.
longestKeyLength (int)
Removed:
method addSpacesToKey(this)
Calculates the amount of spaces needed after the key to make it the key least 4 characters wide.
method addTabs(this, longestKeyLength)
Calculates the amount of tabs to be used.
הערות שחרור
v3 | Fixed more alignment bugs. ספריית Pine
ברוח TradingView אמיתית, המחבר פרסם את קוד Pine זה כספריית קוד פתוח כך שמתכנתי Pine אחרים מהקהילה שלנו יוכלו לעשות בו שימוש חוזר. כל הכבוד למחבר! אתה יכול להשתמש בספרייה זו באופן פרטי או בפרסומי קוד פתוח אחרים, אך השימוש החוזר בקוד זה בפרסומים כפוף לכללי הבית.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
ספריית Pine
ברוח TradingView אמיתית, המחבר פרסם את קוד Pine זה כספריית קוד פתוח כך שמתכנתי Pine אחרים מהקהילה שלנו יוכלו לעשות בו שימוש חוזר. כל הכבוד למחבר! אתה יכול להשתמש בספרייה זו באופן פרטי או בפרסומי קוד פתוח אחרים, אך השימוש החוזר בקוד זה בפרסומים כפוף לכללי הבית.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.