Root static functions of StockChart Component
Create scrollbar svg.
Parameter | Type | Description |
---|---|---|
scrollbar | ScrollBar |
The scrollbar instance. |
renderer | SvgRenderer |
The SVG renderer. |
Returns void
Converts a coefficient value to a vector representing a point on the circumference of a circle.
Parameter | Type | Description |
---|---|---|
coefficient | number |
The coefficient value to convert. |
startAngle | number |
The starting angle of the circle. |
Returns ChartLocation
Transforms a point to its visible position based on the axes range and inversion.
Returns ChartLocation
Renders the accumulation chart data labels using template.
Returns void
Point based animation in chart series.
Parameter | Type | Description |
---|---|---|
element | Element |
element to be animated. |
direction | string |
current direction of the path. |
redraw | boolean |
chart redraw. |
previousDirection (optional) | string |
previous direction of the path. |
animateDuration (optional) | number |
animateDuration of the path. |
removeDirection (optional) | string |
removeDirection of the path. |
Returns void
Animates the rectangle element.
Parameter | Type | Description |
---|---|---|
element | Element |
The rectangle element to animate. |
delay | number |
The delay before starting the animation. |
duration | number |
The duration of the animation. |
currentRect | Rect |
The current rectangle dimensions. |
previousRect | Rect |
The previous rectangle dimensions. |
Returns void
Animates the redrawn element from its start to end location over a specified duration.
Returns void
Animates the text content of an HTML element from a start value to an end value over a specified duration.
Parameter | Type | Description |
---|---|---|
element | HTMLElement |
The HTML element whose text content will be animated. |
duration | number |
The duration of the animation in milliseconds. |
start | number |
The starting value of the animation. |
end | number |
The ending value of the animation. |
customLabelFormat | string |
A custom format string that includes a placeholder for the value. |
Returns void
To append the clip rect element.
Parameter | Type | Description |
---|---|---|
redraw | boolean |
chart redraw value. |
options | BaseAttibutes |
element options. |
renderer | SvgRenderer |
svg renderer values. |
clipPath | string |
clipPath of the element. |
Returns Element
Appends an element to a parent element.
Returns void
Applies a lightness adjustment to the given color.
Parameter | Type | Description |
---|---|---|
color | string |
The input color string. |
value | number |
The value by which to adjust the lightness. |
Returns string
Resets the Blazor templates of the given control (Chart or AccumulationChart).
Parameter | Type | Description |
---|---|---|
control | Chart | AccumulationChart |
The control to reset Blazor templates for. |
Returns void
Calculates the legend shapes based on the provided parameters.
Parameter | Type | Description |
---|---|---|
location | ChartLocation |
The location to position the legend shape. |
size | Size |
The size of the legend shape. |
shape | string |
The shape of the legend. |
options | PathOption |
The options for drawing the legend shape. |
Returns IShapes
Calculates the rect based on the specified location, text size, and margin.
Parameter | Type | Description |
---|---|---|
location | ChartLocation |
The location of the rect. |
textSize | Size |
The size of the text. |
margin | MarginModel |
The margin to be applied around the text. |
Returns Rect
Calculates the shapes based on the specified parameters.
Returns IShapes
Calculates the size of the chart.
Parameter | Type | Description |
---|---|---|
chart | Chart | AccumulationChart | RangeNavigator | StockChart | Chart3D | CircularChart3D |
The chart for which to calculate the size. |
Returns void
Renders the chart data labels using template.
Returns void
Checks if the provided color string is in a valid format.
Parameter | Type | Description |
---|---|---|
color | string |
The color string to check. |
Returns boolean
Converts a color name to its corresponding hexadecimal color code.
Parameter | Type | Description |
---|---|---|
color | string |
The color name to convert. |
Returns string
Converts a component value to its hexadecimal representation.
Parameter | Type | Description |
---|---|---|
value | number |
The component value to convert. |
Returns string
Checks if the specified rect is completely contained within another rect.
Parameter | Type | Description |
---|---|---|
currentRect | Rect |
The rect to check if it’s contained. |
rect | Rect |
The containing rect. |
Returns boolean
Converts a hexadecimal color code to its RedGreenBlue representation.
Parameter | Type | Description |
---|---|---|
hex | string |
The hexadecimal color code to convert. |
Returns ColorValue
Converts the color value to hexadecimal code.
Parameter | Type | Description |
---|---|---|
value | ColorValue |
The color value to convert. |
Returns string
Creates an SVG element for the specified chart or chart element.
Parameter | Type | Description |
---|---|---|
chart | Chart | AccumulationChart | RangeNavigator | Chart3D | CircularChart3D |
The chart or chart element for which to create the SVG element. |
Returns void
Creates a tooltip element with the specified id, text, position, and font size.
Parameter | Type | Description |
---|---|---|
id | string |
The id of the tooltip element. |
text | string |
The text content of the tooltip. |
top | number |
The top position of the tooltip. |
left | number |
The left position of the tooltip. |
fontSize | string |
The font size of the tooltip text. |
Returns void
Creates zooming labels for the specified axis and adds them to the parent element.
Parameter | Type | Description |
---|---|---|
chart | Chart |
The chart instance. |
axis | Axis |
The axis for which to create zooming labels. |
parent | Element |
The parent element to which the labels will be appended. |
index | number |
The index of the label. |
isVertical | boolean |
Indicates whether the axis is vertical. |
rect | Rect |
The bounding rectangle of the label. |
Returns Element
Converts a degree value to a location on the chart based on the provided radius and center point.
Parameter | Type | Description |
---|---|---|
degree | number |
The degree value to convert. |
radius | number |
The radius from the center point. |
center | ChartLocation |
The center point of the chart. |
Returns ChartLocation
Converts a degree value to radians.
Parameter | Type | Description |
---|---|---|
degree | number |
The degree value to convert. |
Returns number
Draws a symbol at the specified location.
Returns Element
Finds the clip rectangle for a series.
Parameter | Type | Description |
---|---|---|
series | Series |
The series for which to find the clip rectangle. |
isCanvas | boolean |
Indicates whether the rendering is on a canvas. |
Returns void
Finds the direction of the crosshair based on the provided parameters.
Parameter | Type | Description |
---|---|---|
rX | number |
The x-coordinate of the crosshair line. |
rY | number |
The y-coordinate of the crosshair line. |
rect | Rect |
The bounding rectangle of the crosshair. |
arrowLocation | ChartLocation |
The location of the arrow in the crosshair. |
arrowPadding | number |
The padding for the arrow. |
top | boolean |
Indicates whether the crosshair is positioned at the top. |
bottom | boolean |
Indicates whether the crosshair is positioned at the bottom. |
left | boolean |
Indicates whether the crosshair is positioned at the left. |
tipX | number |
The x-coordinate of the crosshair tip. |
tipY | number |
The y-coordinate of the crosshair tip. |
Returns string
Converts the first character of a string to lowercase.
Parameter | Type | Description |
---|---|---|
str | string |
The string to convert. |
Returns string
Calculates the actual desired intervals count based on the available size and axis.
Parameter | Type | Description |
---|---|---|
availableSize | Size |
The available size for rendering. |
axis | Axis | Chart3DAxis |
The axis for which to calculate the intervals count. |
Returns number
Calculates the angle between two points.
Parameter | Type | Description |
---|---|---|
center | ChartLocation |
The center point. |
point | ChartLocation |
The point to calculate the angle from the center. |
Returns number
Retrieves the animation function based on the specified effect.
Parameter | Type | Description |
---|---|---|
effect | string |
The name of the animation effect. |
Returns Function
Gets the color from the range color setting model based on the specified value.
Parameter | Type | Description |
---|---|---|
colorMap | RangeColorSettingModel |
The range color setting model. |
value | number |
The value for which to get the color. |
Returns string
Retrieves the DOM element with the specified ID.
Parameter | Type | Description |
---|---|---|
id | string |
The ID of the element to retrieve. |
Returns Element
Gets the gradient color from the range color setting model based on the specified value.
Parameter | Type | Description |
---|---|---|
value | number |
The value for which to get the gradient color. |
colorMap | RangeColorSettingModel |
The range color setting model. |
Returns ColorValue
Calculates the median value of an array of numbers.
Parameter | Type | Description |
---|---|---|
values | number[] |
The array of numbers. |
Returns number
Calculates the minimum points delta between data points on the provided axis.
Parameter | Type | Description |
---|---|---|
axis | Axis | Chart3DAxis |
The axis for which to calculate the minimum points delta. |
seriesCollection | Series[] |
The collection of series in the chart. |
Returns number
Calculates the percentage change between two values.
Parameter | Type | Description |
---|---|---|
percent | number |
The percentage to calculate. |
previous | number |
The previous value. |
next | number |
The next value. |
Returns number
Calculates the color based on the percentage change between two values.
Parameter | Type | Description |
---|---|---|
percent | number |
The percentage change. |
previous | string |
The color for the previous value. |
next | string |
The color for the next value. |
Returns ColorValue
Gets the location of the rectangle based on the specified start and end locations and the outer rectangle.
Parameter | Type | Description |
---|---|---|
startLocation | ChartLocation |
The start location. |
endLocation | ChartLocation |
The end location. |
outerRect | Rect |
The outer rectangle. |
Returns Rect
Get the coordinates of a rotated rectangle.
Parameter | Type | Description |
---|---|---|
actualPoints | ChartLocation[] |
The coordinates of the original rectangle. |
centerX | number |
The x-coordinate of the center of rotation. |
centerY | number |
The y-coordinate of the center of rotation. |
angle | number |
The angle of rotation in degrees. |
Returns ChartLocation[]
Gets the color with adjusted saturation.
Parameter | Type | Description |
---|---|---|
color | string |
The input color string. |
factor | number |
The factor by which to adjust the saturation. |
Returns string
Gets the template function from the provided template string or function.
Parameter | Type | Description |
---|---|---|
template | string | Function |
The template string or function. |
Returns Function
Gets the text anchor based on the specified alignment and Right-to-Left setting.
Parameter | Type | Description |
---|---|---|
alignment | Alignment |
The alignment of the text. |
enableRtl | boolean |
Specifies whether Right-to-Left is enabled. |
Returns string
Gets the title text with specified style and width, and supports right-to-left rendering.
Returns string[]
Gets the transformation of the chart area based on the provided axes and inverted axis state.
Parameter | Type | Description |
---|---|---|
xAxis | Axis |
The X-axis of the chart. |
yAxis | Axis |
The Y-axis of the chart. |
invertedAxis | boolean |
Indicates whether the chart axis is inverted. |
Returns Rect
Gets the Unicode text from the input string based on the provided regular expression.
Parameter | Type | Description |
---|---|---|
text | string |
The input string. |
regexp | RegExp |
The regular expression pattern to match Unicode characters. |
Returns string
Gets the x-coordinate value for a given point value on the axis.
Parameter | Type | Description |
---|---|---|
value | number |
The point value. |
size | number |
The size of the axis. |
axis | Axis |
The axis. |
Returns number
Gets the y-coordinate value for a given point value on the axis.
Parameter | Type | Description |
---|---|---|
value | number |
The point value. |
size | number |
The size of the axis. |
axis | Axis |
The axis. |
Returns number
Retrieves the visible data points from a series.
Parameter | Type | Description |
---|---|---|
series | Series | Chart3DSeries |
The series to retrieve the visible data points. |
Returns Points[]
Finds the index from the given id.
Returns Index
Checks if a value is within the specified range.
Parameter | Type | Description |
---|---|---|
value | number |
The value to check. |
range | VisibleRangeModel |
The range to check against. |
Returns boolean
Checks if a label contains a line break.
Parameter | Type | Description |
---|---|---|
label | string |
The label to check. |
Returns boolean
Checks if the specified rect collides with any of the rect in the collection within the given clip rect.
Parameter | Type | Description |
---|---|---|
rect | Rect |
The rect to check for collision. |
collections | Rect[] |
The collection of rect to check against. |
clipRect | Rect |
The clip rect. |
Returns boolean
Checks if the specified rect overlap each other.
Parameter | Type | Description |
---|---|---|
currentRect | Rect |
The first rect. |
rect | Rect |
The second rect. |
Returns boolean
Helper function to determine whether there is an intersection between the two polygons described by the lists of vertices. Uses the Separating Axis Theorem.
Parameter | Type | Description |
---|---|---|
a | ChartLocation[] |
an array of connected points [{x:, y:}, {x:, y:},…] that form a closed polygon. |
b | ChartLocation[] |
an array of connected points [{x:, y:}, {x:, y:},…] that form a closed polygon. |
Returns boolean
Checks if zooming is enabled for the axis.
Parameter | Type | Description |
---|---|---|
axis | Axis |
The axis to check for zooming. |
Returns boolean
Trims the text and performs line breaks based on the maximum width and font settings.
Returns string[]
Calculates the logarithm of a specified value with respect to a specified base.
Parameter | Type | Description |
---|---|---|
value | number |
The value for which to calculate the logarithm. |
base | number |
The base of the logarithm. |
Returns number
Adjusts the value based on the axis type.
Parameter | Type | Description |
---|---|---|
value | number |
The value to adjust. |
axis | Axis |
The axis used for adjustment. |
Returns number
Animates the marker element.
Parameter | Type | Description |
---|---|---|
element | Element |
The marker element to animate. |
delay | number |
The delay before starting the animation. |
duration | number |
The duration of the animation. |
series | Series | AccumulationSeries |
The series associated with the marker. |
pointIndex | number |
The index of the point in the series. |
point | ChartLocation |
The location of the point. |
isLabel | boolean |
Specifies whether the marker is a data label. |
Returns void
Returns the value constrained within the specified minimum and maximum limits.
Parameter | Type | Description |
---|---|---|
value | number |
The input value. |
min | number |
The minimum limit. |
max | number |
The maximum limit. |
Returns number
Animation after legend click a path.
Parameter | Type | Description |
---|---|---|
element | Element |
element to be animated |
direction | string |
current direction of the path |
redraw | boolean |
chart redraw |
previousDirection (optional) | string |
previous direction of the path |
animateDuration (optional) | number |
animateDuration of the path |
Returns void
Redraws the SVG or canvas element based on the provided options.
Returns Element
Removes the specified element.
Parameter | Type | Description |
---|---|---|
id | string | Element |
The id or reference of the element to be removed. |
Returns void
Rotates the size of text based on the provided angle.
Parameter | Type | Description |
---|---|---|
font | FontModel |
The font style of the text. |
text | string |
The text to be rotated. |
angle | number |
The angle of rotation. |
chart | Chart | Chart3D |
The chart instance. |
themeFontStyle | FontModel |
The font style based on the theme. |
Returns Size
Function to sort the dataSource, by default it sort the data in ascending order.
Parameter | Type | Description |
---|---|---|
data | Object[] |
chart data |
fields | string[] |
date fields |
isDescending (optional) | boolean |
boolean values of descending |
Returns Object[]
Stops the specified timer.
Parameter | Type | Description |
---|---|---|
timer | number |
The timer to stop. |
Returns void
Converts a string value to a number, considering the container size for percentage values.
Parameter | Type | Description |
---|---|---|
value | string |
The string value to convert to a number. |
containerSize | number |
The size of the container, used for percentage values. |
Returns number
Returns a sub-array of values starting from the specified index.
Parameter | Type | Description |
---|---|---|
values | number[] |
The array of numbers. |
index | number |
The index from which the sub-array starts. |
Returns number[]
Subtracts a rectangle representing thickness from the given rectangle.
Parameter | Type | Description |
---|---|---|
rect | Rect |
The rectangle from which to subtract the thickness rectangle. |
thickness | Rect |
The rectangle representing the thickness to subtract. |
Returns Rect
Subtracts thickness from the given rectangle.
Parameter | Type | Description |
---|---|---|
rect | Rect |
The rectangle from which to subtract thickness. |
thickness | Thickness |
The thickness to subtract. |
Returns Rect
Calculates the sum of an array of numbers.
Parameter | Type | Description |
---|---|---|
values | number[] |
An array of numbers. |
Returns number
Animates the template element.
Returns void
Renders a text element using the specified renderer and options.
Returns Element
Trims the text to fit within the specified maximum width.
Returns string
Wraps the input text into multiple lines based on the specified maximum width and font style.
Returns string[]
Calculates the x-coordinate position for rendering the title text within the specified rect.
Parameter | Type | Description |
---|---|---|
rect | Rect |
The rect within which the title text is to be rendered. |
titleStyle | FontModel |
The font style used for rendering the title text. |
Returns number
Triggers the label render event.
Parameter | Type | Description |
---|---|---|
chart | Chart | RangeNavigator | Chart3D |
The chart or range navigator instance. |
tempInterval | number |
The temporary interval value. |
text | string |
The label text. |
labelStyle | FontModel |
The style of the label. |
axis | Axis | Chart3DAxis |
The axis associated with the label. |
Returns void
Converts a value to its corresponding coefficient based on the axis range.
Parameter | Type | Description |
---|---|---|
value | number |
The value to be converted. |
axis | Axis |
The axis object containing range information. |
Returns number
Converts a value to a polar coefficient value based on the axis.
Parameter | Type | Description |
---|---|---|
value | number |
The value to convert. |
axis | Axis |
The axis object. |
Returns number
Checks if a value is within the specified range.
Parameter | Type | Description |
---|---|---|
value | number |
The value to check. |
range | VisibleRangeModel |
The range to check against. |
Returns boolean
Checks if the provided coordinates are within the bounds of the rectangle.
Parameter | Type | Description |
---|---|---|
x | number |
The x-coordinate to check. |
y | number |
The y-coordinate to check. |
bounds | Rect |
The bounding rectangle. |
width | number |
The width of the area to include in the bounds check. |
height | number |
The height of the area to include in the bounds check. |
Returns boolean