Static Functions
12 Sep 20253 minutes to read
Root static functions of Sparkline Component
calculateRoundedRectPath
To get rounded rect path direction.
| Parameter | Type | Description |
|---|---|---|
| r | Rect |
The rect dimensions. |
| topLeft | number |
The radius of the top-left corner. |
| topRight | number |
The radius of the top-right corner. |
| bottomLeft | number |
The radius of the bottom-left corner. |
| bottomRight | number |
The radius of the bottom-right corner. |
Returns string
calculateSize
Method to calculate the width and height of the sparkline.
| Parameter | Type | Description |
|---|---|---|
| sparkline | Sparkline |
The Sparkline instance. |
Returns void
createSvg
Method to create svg for sparkline.
| Parameter | Type | Description |
|---|---|---|
| sparkline | Sparkline |
The Sparkline instance. |
Returns void
getIdElement
To find the element by id.
| Parameter | Type | Description |
|---|---|---|
| id | string |
The id of the element to find. |
Returns Element
removeElement
To remove element by id.
| Parameter | Type | Description |
|---|---|---|
| id | string |
The id of the element to remove. |
Returns void
withInBounds
To find point within the bounds.
| Parameter | Type | Description |
|---|---|---|
| x | number |
The x-coordinate of the point. |
| y | number |
The y-coordinate of the point. |
| bounds | Rect |
The bounding rectangle to check against. |
Returns boolean