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 Microsoft.AspNetCore.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 | @model IEnumerable< FoodSale > @ { ViewBag.DemoSettings = false ; } < c1-tree-map binding = "Sales" binding-name = "Category,SubCategory" > < c1-items-source source-collection = "Model" group-by = "Category,SubCategory" ></ c1-items-source > < c1-flex-chart-tooltip content= "<b>{name}</b><br />{value:c}" ></ c1-flex-chart-tooltip > < c1-flex-chart-datalabel position = "Center" content = "{name}" ></ c1-flex-chart-datalabel > </ c1-tree-map > @section Description{ < p > @Html .Raw(TreeMapRes.GroupCollection_Text0)</ p > } |