Search results

StaticFunctions API in Vue Range Navigator API component

Root static functions of RangeNavigator Component

createScrollSvg

Create scrollbar svg.

Parameter Type Description
scrollbar ScrollBar The scrollbar instance.
renderer SvgRenderer The SVG renderer.

Returns void

CoefficientToVector

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

TransformToVisible

Transforms a point to its visible position based on the axes range and inversion.

Returns ChartLocation

accReactTemplate

Renders the accumulation chart data labels using template.

Returns void

animateAddPoints

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

animateRectElement

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

animateRedrawElement

Animates the redrawn element from its start to end location over a specified duration.

Returns void

appendChildElement

Method to append child element.

Parameter Type Description
isCanvas boolean canvas mode value
parent Element | HTMLElement parent element
childElement Element | HTMLElement childElement element
redraw (optional) boolean chart redraw value
isAnimate boolean animation value
x string x position
y string y position
start (optional) ChartLocation start location value
direction (optional) string direction of the element
forceAnimate boolean forceAnimate
isRect boolean isRect
previousRect Rect previousRect
animateDuration (optional) number duration of the animation
scatterElement boolean The scatter element.
angle number The angle of the element.
currentTransform (optional) ChartLocation The current transform of the element.

Returns void

appendClipElement

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

applyZLight

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

blazorTemplatesReset

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

calculateLegendShapes

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

calculateRect

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

calculateShapes

Calculates the shapes based on the specified parameters.

Returns IShapes

calculateSize

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

chartReactTemplate

Renders the chart data labels using template.

Returns void

checkColorFormat

Checks if the provided color string is in a valid format.

Parameter Type Description
color string The color string to check.

Returns boolean

colorNameToHex

Converts a color name to its corresponding hexadecimal color code.

Parameter Type Description
color string The color name to convert.

Returns string

containsRect

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

convertHexToColor

Converts a hexadecimal color code to its RedGreenBlue representation.

Parameter Type Description
hex string The hexadecimal color code to convert.

Returns ColorValue

convertToHexCode

Converts the color value to hexadecimal code.

Parameter Type Description
value ColorValue The color value to convert.

Returns string

createSvg

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

createTooltip

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

createZoomingLabels

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

degreeToLocation

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

degreeToRadian

Converts a degree value to radians.

Parameter Type Description
degree number The degree value to convert.

Returns number

drawSymbol

Draws a symbol at the specified location.

Returns Element

findClipRect

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

findCrosshairDirection

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

firstToLowerCase

Converts the first character of a string to lowercase.

Parameter Type Description
str string The string to convert.

Returns string

getActualDesiredIntervalsCount

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

getAngle

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

getAnimationFunction

Retrieves the animation function based on the specified effect.

Parameter Type Description
effect string The name of the animation effect.

Returns Function

getColorByValue

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

getElement

Retrieves the DOM element with the specified ID.

Parameter Type Description
id string The ID of the element to retrieve.

Returns Element

getGradientColor

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

getMedian

Calculates the median value of an array of numbers.

Parameter Type Description
values number[] The array of numbers.

Returns number

getMinPointsDelta

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

getPercentage

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

getPercentageColor

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

getRectLocation

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

getRotatedRectangleCoordinates

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[]

getSaturationColor

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

getTemplateFunction

Gets the template function from the provided template string or function.

Parameter Type Description
template string | Function The template string or function.

Returns Function

getTextAnchor

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

getTitle

Gets the title text with specified style and width, and supports right-to-left rendering.

Returns string[]

getTransform

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

getUnicodeText

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

getValueXByPoint

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

getValueYByPoint

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

getVisiblePoints

Retrieves the visible data points from a series.

Parameter Type Description
series Series | Chart3DSeries The series to retrieve the visible data points.

Returns Points[]

indexFinder

Finds the index from the given id.

Returns Index

inside

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

isBreakLabel

Checks if a label contains a line break.

Parameter Type Description
label string The label to check.

Returns boolean

isCollide

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

isOverlap

Checks if the specified rect overlap each other.

Parameter Type Description
currentRect Rect The first rect.
rect Rect The second rect.

Returns boolean

isRotatedRectIntersect

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

isZoomSet

Checks if zooming is enabled for the axis.

Parameter Type Description
axis Axis The axis to check for zooming.

Returns boolean

lineBreakLabelTrim

Trims the text and performs line breaks based on the maximum width and font settings.

Returns string[]

linear

Linear animation function.

Parameter Type Description
currentTime number The current time of the animation.
startValue number The starting value of the animation.
endValue number The ending value of the animation.
duration number The duration of the animation.

Returns number

logBase

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

logWithIn

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

markerAnimate

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

minMax

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

pathAnimation

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

redrawElement

Redraws the SVG or canvas element based on the provided options.

Returns Element

removeElement

Removes the specified element.

Parameter Type Description
id string | Element The id or reference of the element to be removed.

Returns void

rotateTextSize

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

showTooltip

Displays a tooltip at the specified coordinates with the given text.

Parameter Type Description
text string The text content of the tooltip.
x number The x-coordinate where the tooltip should be displayed.
y number The y-coordinate where the tooltip should be displayed.
areaWidth number The width of the area where the tooltip is displayed.
id string The id of the tooltip element.
element Element The element to which the tooltip is appended.
isTouch (optional) boolean Indicates whether the tooltip is displayed on a touch device.
isTitleOrLegendEnabled (optional) boolean Indicates whether the tooltip is enabled for title or legend.

Returns void

sort

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[]

stopTimer

Stops the specified timer.

Parameter Type Description
timer number The timer to stop.

Returns void

stringToNumber

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

subArray

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[]

subArraySum

Calculates the sum of elements in a subarray.

Parameter Type Description
values Object[] The array containing elements.
first number The index of the first element in the subarray.
last number The index of the last element in the subarray.
index number[] The array of indices.
series Series The series object.

Returns number

subtractRect

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

subtractThickness

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

sum

Calculates the sum of an array of numbers.

Parameter Type Description
values number[] An array of numbers.

Returns number

templateAnimate

Animates the template element.

Returns void

textElement

Renders a text element using the specified renderer and options.

Returns Element

textTrim

Trims the text to fit within the specified maximum width.

Returns string

textWrap

Wraps the input text into multiple lines based on the specified maximum width and font style.

Returns string[]

textWrapAnyWhere

Wraps the input text into multiple lines, allowing wrapping at any position.

Returns string[]

titlePositionX

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

triggerLabelRender

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

valueToCoefficient

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

valueToPolarCoefficient

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

withIn

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

withInBounds

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

withInRange

Checks if a point is within the range of the previous and next points in a series.

Parameter Type Description
previousPoint Points The previous point in the series.
currentPoint Points The current point to check.
nextPoint Points The next point in the series.
series Series The series to which the points belong.

Returns boolean