-
Data Grid
- Overview
-
Data Binding
-
Paging and Scrolling
-
Editing
-
Grouping
-
Filtering and Sorting
- Focused Row
-
Row Drag & Drop
-
Selection
-
Columns
- State Persistence
-
Appearance
-
Templates
-
Data Summaries
-
Master-Detail
-
Export to PDF
-
Export to Excel
-
Adaptability
- Keyboard Navigation
-
Pivot Grid
- Overview
-
Data Binding
-
Field Chooser
-
Features
-
Export to Excel
-
Tree List
- Overview
-
Data Binding
- Sorting
- Paging
-
Editing
- Node Drag & Drop
- Focused Row
-
Selection
-
Filtering
-
Column Customization
- State Persistence
- Adaptability
- Keyboard Navigation
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Features
- Virtual Scrolling
-
Grouping
-
Customization
- Adaptability
-
Html Editor
-
Chat
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
Charts
- Overview
-
Data Binding
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Line Charts
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
-
Sparkline Charts
-
Tree Map
-
Funnel and Pyramid Charts
- Sankey Chart
-
Combinations
-
More Features
-
Export
-
Selection
-
Tooltips
-
Zooming
-
-
Gantt
- Overview
-
Data
-
UI Customization
- Strip Lines
- Export to PDF
- Sorting
-
Filtering
-
Reporting
- AI-powered Extensions
-
Interaction
-
Report Types
-
Data binding
-
Real-life Reports
-
Layout Features
-
Report Controls
-
Web-specific Features
-
Rich Text Editor
- Overview
- Load/Save
- Document Protection
-
Templates
- Autocorrect
-
Customization
- Simple View
-
Spreadsheet
- Overview
-
Open a Document
- Export And Printing
-
Features
-
UI Customization
-
Gauges
- Overview
-
Data Binding
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Navigation
- Overview
- Accordion
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
- Pagination
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Resizable
-
-
Editors
- Overview
- Autocomplete
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Drop Down Box
-
Number Box
-
Select Box
- Switch
-
Tag Box
- Text Area
- Text Box
- Validation
- Custom Text Editor Buttons
- Right-to-Left Support
- Editor Appearance Variants
-
Forms and Multi-Purpose
- Overview
- Button Group
- Field Set
-
Filter Builder
-
Form
- Radio Group
-
Range Selector
- Numeric Scale (Lightweight)
- Numeric Scale
- Date-Time Scale (Lightweight)
- Date-Time Scale
- Logarithmic Scale
- Discrete scale
- Custom Formatting
- Use Range Selection for Calculation
- Use Range Selection for Filtering
- Image on Background
- Chart on Background
- Customized Chart on Background
- Chart on Background with Series Template
- Range Slider
- Slider
-
Sortable
-
File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Actions and Lists
-
Maps
- Overview
-
Map
-
Vector Map
-
Dialogs and Notifications
-
Localization
Related Demos:
Your search did not match any results.
Range Selector - Chart on Background with Series Template
This demo demonstrates the ability of the RangeSelector to display the Chart component with series defined using a series template.
Was this demo helpful?
Feel free to share demo-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Backend API
@(Html.DevExtreme().RangeSelector()
.ID("range-selector")
.Margin(m => m.Top(50))
.Scale(s => s.Label(f => f.Format(Format.Decimal)))
.Chart(c => c
.CommonSeriesSettings(x => x
.ArgumentField("Year")
.ValueField("Oil")
.Type(SeriesType.Spline)
)
.SeriesTemplate(x => x
.NameField("Country")
.CustomizeSeries(@<text>
function(valueFromNameField) {
return valueFromNameField === "USA" ? { color: "red" } : {};
}
</text>)
)
)
.Title("Select a Year Period")
.DataSource(Model)
)
using DevExtreme.NETCore.Demos.Models.SampleData;
using Microsoft.AspNetCore.Mvc;
using System.Linq;
namespace DevExtreme.NETCore.Demos.Controllers {
public class RangeSelectorController : Controller {
public ActionResult ChartOnBackgroundWithSeriesTemplate() {
return View(SampleData.OilProductionData.Where(e => new[] { "USA", "Saudi Arabia", "Mexico" }.Contains(e.Country)));
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
namespace DevExtreme.NETCore.Demos.Models {
public class OilProduction {
public int Year { get; set; }
public string Country { get; set; }
public double Oil { get; set; }
}
}
using System.Collections.Generic;
namespace DevExtreme.NETCore.Demos.Models.SampleData {
public partial class SampleData {
public static readonly IEnumerable<OilProduction> OilProductionData = new[] {
new OilProduction { Year = 1970, Country = "Saudi Arabia", Oil = 186.7 },
new OilProduction { Year = 1970, Country = "USA", Oil = 557.8 },
new OilProduction { Year = 1970, Country = "Iran", Oil = 207.3 },
new OilProduction { Year = 1970, Country = "Mexico", Oil = 24.7 },
new OilProduction { Year = 1980, Country = "Saudi Arabia", Oil = 480.4 },
new OilProduction { Year = 1980, Country = "USA", Oil = 423.2 },
new OilProduction { Year = 1980, Country = "Iran", Oil = 74.3 },
new OilProduction { Year = 1980, Country = "Mexico", Oil = 109.2 },
new OilProduction { Year = 1990, Country = "Saudi Arabia", Oil = 319.6 },
new OilProduction { Year = 1990, Country = "USA", Oil = 340.1 },
new OilProduction { Year = 1990, Country = "Iran", Oil = 183.3 },
new OilProduction { Year = 1990, Country = "Mexico", Oil = 145.3 },
new OilProduction { Year = 1990, Country = "Russia", Oil = 499.6 },
new OilProduction { Year = 2000, Country = "Saudi Arabia", Oil = 465 },
new OilProduction { Year = 2000, Country = "USA", Oil = 282.9 },
new OilProduction { Year = 2000, Country = "Iran", Oil = 195.5 },
new OilProduction { Year = 2000, Country = "Mexico", Oil = 148.3 },
new OilProduction { Year = 2000, Country = "Russia", Oil = 375.3 },
new OilProduction { Year = 2008, Country = "Saudi Arabia", Oil = 549.7 },
new OilProduction { Year = 2008, Country = "USA", Oil = 280 },
new OilProduction { Year = 2008, Country = "Iran", Oil = 214.9 },
new OilProduction { Year = 2008, Country = "Mexico", Oil = 132.1 },
new OilProduction { Year = 2008, Country = "Russia", Oil = 503.2 },
new OilProduction { Year = 2009, Country = "Saudi Arabia", Oil = 428.4 },
new OilProduction { Year = 2009, Country = "USA", Oil = 298.9 },
new OilProduction { Year = 2009, Country = "Iran", Oil = 217.2 },
new OilProduction { Year = 2009, Country = "Mexico", Oil = 121.6 },
new OilProduction { Year = 2009, Country = "Russia", Oil = 493.1 }
};
}
}
#range-selector {
height: 310px;
}