Your search did not match any results.

Charts - Discrete Aggregation

To aggregate points on discrete axes, follow the steps below.

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")) .DataSource(Model) )
using DevExtreme.AspNet.Data; using DevExtreme.AspNet.Mvc; using DevExtreme.NETCore.Demos.Models; using DevExtreme.NETCore.Demos.Models.SampleData; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; namespace DevExtreme.NETCore.Demos.Controllers { public class ChartsController : Controller { public ActionResult DiscreteAggregation() { return View(SampleData.OilProductionByMonths); } } }
#chart { height: 440px; }
  1. Enable aggregation.
    You can enable data aggregation for the following series:

Individual series aggregation settings have priority over common aggregation settings in the component. For example, you can enable aggregation for all series and disable it for a specific series.

In this demo, data aggregation is enabled for all series.

  1. Specify an aggregation method (optional).
    In this demo, the sum method is used.