FlexPie
選択
機能
サンプル
設定
説明
このビューは、FlexPie の選択機能を示します。
ソース
SelectionController.cs
using MvcExplorer.Models; using System.Collections.Generic; using Microsoft.AspNetCore.Mvc; using C1.Web.Mvc.Chart; 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; } } }
Selection.cshtml
@{ ViewBag.DemoSettings = true; ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel; } <c1-flex-pie id="@demoSettingsModel.ControlId" header="Sales" binding-name="Country" binding="Count" selection-mode="Point" is-animated="true" selected-item-position="Top"> <c1-items-source source-collection="Model"></c1-items-source> </c1-flex-pie> @section Description{ <p>@Html.Raw(FlexPieRes.Selection_Text0)</p> }
マニュアル