-
Data Grids / Data Management
-
Data Grid
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Grouping
-
Selection
- Focused Row
- Paging
-
Scrolling
-
Columns
-
Master-Detail
-
Data Summaries
-
Drag & Drop
-
Export to PDF
-
Export to Excel
- Appearance
-
Customization
- State Persistence
-
Adaptability
-
Keyboard Navigation
- Right-To-Left Support
-
Tree List
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Selection
- Focused Row
- Paging
-
Columns
- Drag & Drop
- State Persistence
- Adaptability
-
Keyboard Navigation
-
Card View
-
Pivot Grid
- Overview
-
Data Binding
-
Field Management
-
Data Summaries
- Drill Down
- Filtering
-
Scrolling
-
Export to Excel
- Chart Integration
- Customization
- State Persistence
-
Filter Builder
-
-
Data Visualization
-
Charts
- Overview
-
Data Binding
-
Common Concepts
-
Axis
-
Aggregation
-
Tooltips
-
Selection
-
Customization
-
Zooming
-
Export
-
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Funnel and Pyramid Charts
-
Line Charts
- Pareto Chart
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
- Sankey Chart
-
Sparkline Charts
-
Tree Map
-
Gauges
- Overview
-
Runtime update
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
-
Scheduling / Planning
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Appointments
-
Timetable
- Editing
-
Grouping
- Virtual Scrolling
- Drag & Drop
-
Customization
- Adaptability
-
Gantt
- Overview
- Data Binding
-
Filtering
- Sorting
- Strip Lines
- Export to PDF
- Validation
-
Customization
-
-
Messaging
-
WYSIWYG Editor
-
Forms
-
Data Editors
- Overview
-
Common Concepts
-
Calendar
- Check Box
- Color Box
- Date Box
-
Date Range Box
-
Number Box
- Radio Group
-
Range Selector
- Range Slider
- Slider
- Switch
- Text Area
- Text Box
-
Drop-Downs
- Autocomplete
-
Drop Down Box
-
Select Box
-
Tag Box
-
Lookup
-
Buttons
-
File Upload / File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Popup and Notifications
-
Navigation
- Overview
- Accordion
-
Context Menu
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
-
Stepper
- Pagination
-
List
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
-
-
Interactive Wrappers
-
Sortable
- Resizable
-
-
Progress Indicators
-
Maps
- Overview
-
Map
-
Vector Map
-
Data Binding
- Multiple Layers
-
Markers
- Legend
-
Zooming and Panning
-
Customization
-
-
Localization
Related Demos:
Your search did not match any results.
Range Selector - Embedded Chart (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.AspNet.Data;
using DevExtreme.AspNet.Mvc;
using DevExtreme.MVC.Demos.Models.SampleData;
using System.Linq;
using System.Web.Mvc;
namespace DevExtreme.MVC.Demos.Controllers {
public class RangeSelectorController : Controller {
public ActionResult EmbeddedChartSeriesTemplate() {
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.MVC.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.MVC.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;
}