-
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.
Charts - Discrete Axis Zooming and Panning
Discrete data support is one of many strengths of the Chart component. In this example, you can zoom data in the Chart using another DevExtreme JavaScript UI component, the RangeSelector.
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
<div id="chart-demo">
@{
var dataSource = new object[] {
new { arg = "Inner Core", Si = 7.35, Fe = 79.39, Ni = 5.2, S = 2.3, O = 4.1 },
new { arg = "Outer Core", Si = 7.33, Fe = 78.56, Ni = 5.2, S = 2.7, O = 4.2 },
new { arg = "Lower Mantle", Si = 21.5, Fe = 5.8, O = 44.8, Mg = 22.8, Al = 2.2, Ca = 2.3, Na = 0.3, K = 0.03 },
new { arg = "Upper Mantle", Si = 28.1, Mg = 23.2, Fe = 4.3, Al = 1.2, Ca = 2.2, O = 40.3, Na = 0.2 },
new { arg = "Lower Crust", O = 46.6, Si = 27.7, Al = 8.1, Fe = 5, Ca = 3.6, Na = 2.8, K = 2.6, Mg = 1.5 },
new { arg = "Upper Crust", O = 47, Si = 29.5, Al = 8.05, Fe = 4.66, Ca = 2.96, Na = 2.5, K = 2.5, Mg = 1.87 }
};
}
@(Html.DevExtreme().Chart()
.ID("zoomedChart")
.Palette(VizPalette.Soft)
.Title("The Chemical Composition of the Earth Layers")
.ValueAxis(a => a
.Add()
.Label(l => l
.CustomizeText(@<text>
function() {
return this.valueText + "%";
}
</text>)))
.DataSource(dataSource)
.Series(s => {
s.Add().Name("Si").ValueField("Si");
s.Add().Name("Fe").ValueField("Fe");
s.Add().Name("Ni").ValueField("Ni");
s.Add().Name("S").ValueField("S");
s.Add().Name("O").ValueField("O");
s.Add().Name("Mg").ValueField("Mg");
s.Add().Name("Al").ValueField("Al");
s.Add().Name("K").ValueField("K");
s.Add().Name("Na").ValueField("Na");
})
.CommonSeriesSettings(s => s
.Type(SeriesType.Bar)
.IgnoreEmptyPoints(true)
)
.Legend(l => l
.Border(b => b.Visible(true))
.Visible(true)
.VerticalAlignment(VerticalEdge.Top)
.HorizontalAlignment(HorizontalAlignment.Right)
.Orientation(Orientation.Horizontal)
)
)
@(Html.DevExtreme().RangeSelector()
.Size(s => s.Height(120))
.Margin(m => m.Left(10))
.Scale(s => s.MinorTickCount(1))
.DataSource(dataSource)
.Chart(c => c
.Palette(VizPalette.Soft)
.CommonSeriesSettings(s => s
.Type(SeriesType.Bar)
.IgnoreEmptyPoints(true)
)
.Series(s => {
s.Add().Name("Si").ValueField("Si");
s.Add().Name("Fe").ValueField("Fe");
s.Add().Name("Ni").ValueField("Ni");
s.Add().Name("S").ValueField("S");
s.Add().Name("O").ValueField("O");
s.Add().Name("Mg").ValueField("Mg");
s.Add().Name("Al").ValueField("Al");
s.Add().Name("K").ValueField("K");
s.Add().Name("Na").ValueField("Na");
}))
.Behavior(b => b.ValueChangeMode(SliderValueChangeMode.OnHandleMove))
.OnValueChanged(@<text>
function (e) {
$("#zoomedChart").dxChart("instance").getArgumentAxis().visualRange(e.value);
}
</text>)
)
</div>
using DevExtreme.AspNet.Data;
using DevExtreme.AspNet.Mvc;
using DevExtreme.NETCore.Demos.Models;
using DevExtreme.NETCore.Demos.Models.SampleData;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
namespace DevExtreme.NETCore.Demos.Controllers {
public class ChartsController : Controller {
public ActionResult DiscreteAxisZoomingAndScrolling() {
return View();
}
}
}
#zoomedChart {
margin-bottom: 20px;
}