You don't need to initialize anything..
After you import the library you can use .print() as easy as that..!
Hope this helps
* use a unique ID for each .print() call
let me know if you run into any bugs
by trying to make it as user friendly as possible i had to do
some not ideal things so there's a chance it could present some bugs with
a lot of labels present on the chart
and if you use label.all to parse and manipulate the labels on the chart..
most likely it will cause an issue but not a lot of people use this so
I don't think that will be a problem.
thanks,
FFriZz | frizlabz
Library "print"
Single function to print any type to console
method str(inp)
ββ`method` convert all types to string
```
(overload)
*.str(any inp) => string
```
ββNamespace types: series string, simple string, input string, const string
ββParameters:
ββββinp (string): `any` - desc | Required
ββReturns: `string` formatted string
method str(inp)
ββNamespace types: series int, simple int, input int, const int
ββParameters:
ββββinp (int)
method str(inp)
ββNamespace types: series float, simple float, input float, const float
ββParameters:
ββββinp (float)
method str(inp)
ββNamespace types: series bool, simple bool, input bool, const bool
ββParameters:
ββββinp (bool)
method str(inp)
ββNamespace types: series linefill
ββParameters:
ββββinp (linefill)
method str(inp)
ββNamespace types: series line
ββParameters:
ββββinp (line)
method str(inp)
ββNamespace types: series box
ββParameters:
ββββinp (box)
method str(inp)
ββNamespace types: series label
ββParameters:
ββββinp (label)
method str(inp)
ββNamespace types: matrix<string>
ββParameters:
ββββinp (matrix<string>)
method str(inp)
ββNamespace types: matrix<int>
ββParameters:
ββββinp (matrix<int>)
method str(inp)
ββNamespace types: matrix<float>
ββParameters:
ββββinp (matrix<float>)
method str(inp)
ββNamespace types: matrix<bool>
ββParameters:
ββββinp (matrix<bool>)
method str(inp)
ββNamespace types: matrix<linefill>
ββParameters:
ββββinp (matrix<linefill>)
method str(inp)
ββNamespace types: matrix<line>
ββParameters:
ββββinp (matrix<line>)
method str(inp)
ββNamespace types: matrix<box>
ββParameters:
ββββinp (matrix<box>)
method str(inp)
ββNamespace types: matrix<label>
ββParameters:
ββββinp (matrix<label>)
method str(inp)
ββNamespace types: linefill[]
ββParameters:
ββββinp (linefill[])
method str(inp)
ββNamespace types: line[]
ββParameters:
ββββinp (line[])
method str(inp)
ββNamespace types: box[]
ββParameters:
ββββinp (box[])
method str(inp)
ββNamespace types: label[]
ββParameters:
ββββinp (label[])
method str(inp)
ββNamespace types: string[]
ββParameters:
ββββinp (string[])
method str(inp)
ββNamespace types: int[]
ββParameters:
ββββinp (int[])
method str(inp)
ββNamespace types: float[]
ββParameters:
ββββinp (float[])
method str(inp)
ββNamespace types: bool[]
ββParameters:
ββββinp (bool[])
method arrayShorten(str)
ββarrayShorten
ββNamespace types: series string, simple string, input string, const string
ββParameters:
ββββstr (string): `string` - the string to shorten | Required
ββReturns: `string` - a shortened version of the input string if it is an array with more than 7 elements, otherwise the original string
method matrixShorten(str)
ββmatrixShorten
ββNamespace types: series string, simple string, input string, const string
ββParameters:
ββββstr (string): `string` - the string to shorten | Required
ββReturns: `string` - the shortened matrix string if the input is a matrix, otherwise returns the input string as is
method print(x, ID)
ββprint all types to theh same console with just this `method/function`
```
(overload)
*.print(any x, string ID, bool shorten=true?) => console
"param 'shorten' - only for arrays and matrixs" | true
```
ββNamespace types: series string, simple string, input string, const string
ββParameters:
ββββx (string): - `any` input to convert
ββββID (string): - `string` unique id for label on console `MUST BE UNIQUE`
ββReturns: adds the `ID` and the `inp` to the console on the chart
method print(x, ID)
ββNamespace types: series float, simple float, input float, const float
ββParameters:
ββββx (float)
ββββID (string)
method print(x, ID)
ββNamespace types: series int, simple int, input int, const int
ββParameters:
ββββx (int)
ββββID (string)
method print(x, ID)
ββNamespace types: series box
ββParameters:
ββββx (box)
ββββID (string)
method print(x, ID)
ββNamespace types: series bool, simple bool, input bool, const bool
ββParameters:
ββββx (bool)
ββββID (string)
method print(x, ID)
ββNamespace types: series label
ββParameters:
ββββx (label)
ββββID (string)
method print(x, ID)
ββNamespace types: series line
ββParameters:
ββββx (line)
ββββID (string)
method print(x, ID)
ββNamespace types: series linefill
ββParameters:
ββββx (linefill)
ββββID (string)
method print(x, ID, shorten)
ββNamespace types: string[]
ββParameters:
ββββx (string[])
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: float[]
ββParameters:
ββββx (float[])
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: int[]
ββParameters:
ββββx (int[])
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: box[]
ββParameters:
ββββx (box[])
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: bool[]
ββParameters:
ββββx (bool[])
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: label[]
ββParameters:
ββββx (label[])
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: line[]
ββParameters:
ββββx (line[])
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: linefill[]
ββParameters:
ββββx (linefill[])
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: matrix<string>
ββParameters:
ββββx (matrix<string>)
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: matrix<float>
ββParameters:
ββββx (matrix<float>)
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: matrix<int>
ββParameters:
ββββx (matrix<int>)
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: matrix<box>
ββParameters:
ββββx (matrix<box>)
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: matrix<bool>
ββParameters:
ββββx (matrix<bool>)
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: matrix<label>
ββParameters:
ββββx (matrix<label>)
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: matrix<line>
ββParameters:
ββββx (matrix<line>)
ββββID (string)
ββββshorten (bool)
method print(x, ID, shorten)
ββNamespace types: matrix<linefill>
ββParameters:
ββββx (matrix<linefill>)
ββββID (string)
ββββshorten (bool)