TreeMap
TreeMap
Group Collection
The view shows how to use the TreeMap chart with grouped data.
Features
Description
The view shows how to use the TreeMap chart with grouped data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | using MvcExplorer.Models; using System.Web.Mvc; namespace MvcExplorer.Controllers { public partial class TreeMapController : Controller { // GET: GroupCollection public ActionResult GroupCollection() { return View(FoodSale.GetGroupData()); } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | @model IEnumerable< FoodSale > @ { ViewBag.DemoSettings = false ; } @ (Html.C1().TreeMap() .Binding( "Sales" ) .BindingName( "Category" , "SubCategory" ) .Bind(isb => isb.Bind(Model).GroupBy( "Category" , "SubCategory" )) .Tooltip(t => t.Content( "<b>{name}</b><br />{value:c}" )) .DataLabel(dlb => dlb.Position(C1.Web.Mvc.Chart.LabelPosition.Center).Content( "{name}" ))) @section Description{ < p > @Html .Raw(Resources.TreeMap.GroupCollection_Text0)</ p > } |