Your search did not match any results.



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 property, and the Chart will do the rest.

Backend API
@(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() .Tick(t => t.Visible(false)) .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.NETCore.Demos.Models; using DevExtreme.NETCore.Demos.Models.SampleData; using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; namespace DevExtreme.NETCore.Demos.Controllers { public class ChartsController : Controller { public ActionResult AjaxRequest() { return View(); } } }
#chart { height: 440px; }