-
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
-
-
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
-
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.
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;
}