Your search did not match any results.

Discrete Aggregation

The aggregation algorithm depends on the aggregateByCategory property. In this demo, this property 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.

Backend API
@(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; }