Your search did not match any results.
Charts

Simple Array

Documentation
In this demo, the Chart widget is populated with data taken from a simple JavaScript array. It is the easiest way to provide data for the widget, and it is the right choice if you do not need to get data from the server or update data dynamically.
www.geohive.com
@(Html.DevExtreme().Chart() .ID("chart") .DataSource(new JS("populationData")) .Series(s => s .Add() .Type(SeriesType.Bar) ) .ValueAxis(a => a .Add() .Label(l => l .Format(f => f .Type(Format.Millions) ) ) ) .Legend(l => l.Visible(false)) .ArgumentAxis(a => a.TickInterval(10)) .Title("World Population by Decade") ) <script src="~/data/populationData.js"></script>
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; namespace DevExtreme.NETCore.Demos.Controllers { public class ChartsController : Controller { public ActionResult SimpleArray() { return View(); } } }
var populationData = [{ arg: 1950, val: 2525778669 }, { arg: 1960, val: 3026002942 }, { arg: 1970, val: 3691172616 }, { arg: 1980, val: 4449048798 }, { arg: 1990, val: 5320816667 }, { arg: 2000, val: 6127700428 }, { arg: 2010, val: 6916183482 }];
#chart { height: 440px; }