FlexPie
Selection
This view shows the FlexPie's selection feature.
Features
Settings
Selected Item Position: Top
Selected Item Offset: 0
Is Animated: True
Description
This view shows the FlexPie's selection feature.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | using System.Collections.Generic; using System.Web.Mvc; using C1.Web.Mvc.Chart; using MvcExplorer.Models; namespace MvcExplorer.Controllers { public partial class FlexPieController : Controller { public ActionResult Selection() { ViewBag.DemoSettingsModel = new ClientSettingsModel { Settings = CreateSelectionSettings() }; return View(CustomerOrder.GetCountryGroupOrderData()); } private static IDictionary< string , object []> CreateSelectionSettings() { var settings = new Dictionary< string , object []> { { "SelectedItemPosition" , new object []{Position.Top, Position.Bottom, Position.Left, Position.None, Position.Right, Position.Auto}}, { "SelectedItemOffset" , new object []{0, 0.1, 0.2}}, { "IsAnimated" , new object []{ true , false }} }; return settings; } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 | @using C1.Web.Mvc.Chart @model IEnumerable< CustomerOrder > @ { ViewBag.DemoSettings = true ; ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel; } @ (Html.C1().FlexPie< CustomerOrder >().Id(demoSettingsModel.ControlId).Header( "Sales" ).Bind( "Country" , "Count" , Model) .SelectionMode(SelectionMode.Point).IsAnimated( true ).SelectedItemPosition(Position.Top)) @section Description{ < p > @Html .Raw(Resources.FlexPie.Selection_Text0)</ p > } |