The JavaScript Range Selector is an interface for selecting a small range from a larger collection. It is commonly used in financial dashboards to filter a date range for data that needs to be visualized.
Plot any type of data in the range selector using different value types like numeric, date-time, and logarithmic.
Plot data in the range selector with different chart types like line, area, and step line.
Skip the chart and show only the range for selecting data. This makes the range selector lightweight in mobile devices.
Major and minor scales display the range with different intervals and are placed at multiple levels of the range selector. A date-time scale can also be configured to be shown in major and minor scales.
Select data using predefined periods in the range selector and use the date picker to select a custom range.
Bind selected data from the range selector to any other data visualization control using built-in events.
Allows you to defer the selected range to be updated until the user stops dragging the scrolling thumbs. This provides a smooth scrolling experience.
The range selector control provides the following three ways to select a range:
All the elements of the range selector are highly customizable with built-in APIs.
Customize the size, color, font family, font attribute, and alignment of the labels using built-in APIs.
Customize the appearance of the left and right thumbs using built-in APIs.
Customize the color, stroke width, dash array, and visibility of the major and minor gridlines using built-in APIs.
Tooltips display the start and end values of a selected range, allowing users to easily select a required range.
The range selector supports right-to-left rendering and allows the series and scale direction to be displayed from the right to left. This improves the user experience and accessibility of RTL languages.
The interactive range selector control also support touch interactions.
All the features in range selector will work on touch devices with zero configuration. Use the touch features such as tooltip and thumb drag without any customization.
You can view the range selector on various devices. It is also possible to hide chart for particular screen sizes by making a very minimal change.
You can render range selector control in all the modern browsers.
Easily get started with JavaScript Range Selector using a few simple lines of HTML and JS code example as demonstrated below. Also explore our JavaScript Range Selector Example that shows you how to render and configure the chart.
<!DOCTYPE html>
<html>
<head></head>
<body>
<div id="container">
<div id="element"></div>
</div>
</body>
</html>
import { RangeNavigator, AreaSeries, DateTime} from "@syncfusion/ej2-charts";
RangeNavigator.Inject(AreaSeries, DateTime);
import { datasrc } from "./datasource.ts";
let range: RangeNavigator = new RangeNavigator({
valueType: 'DateTime',
value: [new Date('2017-09-01'), new Date('2018-02-01')],
labelFormat: 'MMM-yy',
series: [{
dataSource: datasrc, xName: 'x', yName: 'y', type: 'Area', width: 2,
}],
}, '#element');
The Range Selector component is also available in Blazor, React, Angular, and Vue frameworks. Check out the different Range Selector platforms from the links below,
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.