Slider

1 min read

🎨 Go to AntV Design | 缩略轴 Axis Navigator of 墨者学院 to learn more about Design guide

Slider

slider

Properties - SliderCfg

Only line plot, area plot and dual-axes plot are supported.

PropertiesTypeDescription
startnumberDefault starting position
endnumberDefault ending position
heightnumberSlider height
trendCfgTrendCfgConfiguration of background trends
backgroundStyleobjectBackground style, referenceGraphic Style
foregroundStyleobjectForeground style, referenceGraphic Style
handlerStyleHandlerStyleHandler configuration
textStyleobjectText style, referenceGraphic Style
minLimitnumberLower limit of sliding position allowed
maxLimitnumberUpper limit of sliding position allowed
formatterFunctionSlider text formatting function

Types of TrendCfg are as follow:

PropertiesTypeDescription
datanumber[]Trend data
smoothbooleanWhether smooth
isAreabooleanWhether area
backgroundStyleobjectBackground style configuration, referenceGraphic Style
lineStyleobjectLine style configuration, referenceGraphic Style
areaStyleobjectArea style configuration, referenceGraphic Style

Types of HandlerStyle are as follow:

PropertiesTypeDescription
widthnumberWidth of slider handler
heightnumberHeight of slider handler
fillstringFill color of handler
highLightFillstringHighlight fill color of handler (when hovering)
strokestringStroke color of handler
opacitynumberFill opacity of handler
radiusnumberRadius of handler rect
cursorstringStyle of cursor (when hovering handler)