Your search did not match any results.
Charts

Pie with Resolved Label Overlapping

Documentation
In the PieChart, series may include a large number of points, which may result in point label overlapping. This demo illustrates the resolveLabelOverlapping option that allows you to specify how the widget must behave when point labels overlap.
<div id="chart-demo"> @(Html.DevExtreme().PieChart() .ID("pie-chart") .Palette(VizPalette.Bright) .Title("Olympic Medals in 2008") .Margin(m => m.Bottom(20)) .Legend(l => l.Visible(false)) .Animation(a => a.Enabled(false)) .ResolveLabelOverlapping(PieChartResolveLabelOverlapping.Shift) .Export(e => e.Enabled(true)) .Series(s => s .Add() .ArgumentField("Country") .ValueField("Medals") .Label(l => l .Visible(true) .CustomizeText(@<text> function(arg) { return arg.argumentText + " ( " + arg.percentText + ")"; } </text>) ) ) .DataSource(new List<object> { new { Country = "USA", Medals = 110 }, new { Country = "China", Medals = 100 }, new { Country = "Russia", Medals = 72 }, new { Country = "Britain", Medals = 47 }, new { Country = "Australia", Medals = 46 }, new { Country = "Germany", Medals = 41 }, new { Country = "France", Medals = 40 }, new { Country = "South Korea", Medals = 31 }, new { Country = "Japan", Medals = 25 }, new { Country = "Italy", Medals = 27 }, new { Country = "Ukraine", Medals = 27 }, new { Country = "Japan ", Medals = 25 }, new { Country = "Cuba ", Medals = 24 } }) ) <div class="center"> <span>Label Overlapping Resolution Mode</span> @(Html.DevExtreme().SelectBox() .DataSource(new[] { PieChartResolveLabelOverlapping.Shift, PieChartResolveLabelOverlapping.Hide, PieChartResolveLabelOverlapping.None }) .Value(PieChartResolveLabelOverlapping.Shift) .OnValueChanged(@<text> function (e) { $("#pie-chart").dxPieChart("option", "resolveLabelOverlapping", e.value); } </text>) ) </div> </div>
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.Web.Mvc; namespace DevExtreme.MVC.Demos.Controllers { public class ChartsController : Controller { public ActionResult PieWithResolvedLabelOverlapping() { return View(); } } }
#chart-demo { height: 440px; } #chart-demo .center { text-align: center; } #chart-demo .center > span, #chart-demo .center > .dx-widget { display: inline-block; vertical-align: middle; }