Your search did not match any results.

Ajax Request

If your server stores data in JSON format, making AJAX requests is inevitable. But instead of configuring these requests manually, assign the URL of your data storage (in this demo, a JSON file) to the dataSource option, and the Chart will do the rest.
@(Html.DevExtreme().Chart() .ID("chart") .Rotated(true) .DataSource("") .Series(s => s.Add() .Label(l => l .Visible(true) .BackgroundColor("#c18e92") ) .Color("#79cac4") .Type(SeriesType.Bar) .ArgumentField("day") .ValueField("sales") ) .Title("Daily Sales") .ArgumentAxis(a => a .Label(l => l .CustomizeText(@<text> function() { return "Day " + this.valueText; } </text>) ) ) .ValueAxis(a => a.Add() .Label(l => l.Visible(false)) ) .Export(e => e.Enabled(true)) .Legend(l => l.Visible(false)) )
using DevExtreme.AspNet.Data; using DevExtreme.AspNet.Mvc; using DevExtreme.MVC.Demos.Models; using DevExtreme.MVC.Demos.Models.SampleData; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class ChartsController : Controller { public ActionResult AjaxRequest() { return View(); } } }
#chart { height: 440px; }