Your search did not match any results.
Charts

Discrete Aggregation

The aggregation algorithm depends on the aggregateByCategory option. In this demo, this option is set to true and applies the "sum" aggregation method for the groups specified in the dataSource.

If aggregateByCategory is false, the specified aggregation method is not applied. The first series point is displayed instead.

U.S. Energy Information Administration (Oct 2019)
@(Html.DevExtreme().Chart() .ID("chart") .Title(t => t.Text("Production of Crude Oil").Subtitle("(in Barrels)")) .CommonSeriesSettings(s => { s.Aggregation(a => a.Enabled(true).Method(ChartSeriesAggregationMethod.Sum)) .ArgumentField("State") .ValueField("Value") .Type(SeriesType.Bar); }) .SeriesTemplate(t => t.NameField("Year")) .ArgumentAxis(a => a.AggregateByCategory(true)) .DataSource(Model) )
using DevExtreme.AspNet.Data; using DevExtreme.AspNet.Mvc; using DevExtreme.MVC.Demos.Models.SampleData; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class ChartsController : Controller { public ActionResult DiscreteAggregation() { return View(SampleData.OilProductionByMonths); } } }
#chart { height: 440px; }