Settings
Chart Type: Line
Stacking: None
Start Angle: 0
Total Angle: 360
Reversed: False
Description
The example shows how to create and customize a Polar chart.
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 33 34 | using MvcExplorer.Models; using System.Collections.Generic; using Microsoft.AspNetCore.Mvc; namespace MvcExplorer.Controllers { public partial class FlexRadarController : Controller { private List<MapData> mapData = MapData.GetData(); public ActionResult Polar() { var settings = new ClientSettingsModel { Settings = CreateRadarSettings(), DefaultValues = GetPolarDefaultValues() }; settings.LoadRequestData(Request); ViewBag.DemoSettingsModel = settings; return View(mapData); } private static IDictionary< string , object > GetPolarDefaultValues() { var defaultValues = new Dictionary< string , object > { { "ChartType" , "Line" }, { "TotalAngle" , 360} }; return defaultValues; } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | @model IEnumerable< MapData > @using C1.Web.Mvc.Chart @ { ViewBag.DemoSettings = true ; ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel; var chartType = demoSettingsModel.GetEnum( "ChartType" , C1.Web.Mvc.Chart.RadarChartType.Line); var stacking = demoSettingsModel.GetEnum( "Stacking" , C1.Web.Mvc.Chart.Stacking.None); } < c1-flex-radar binding-x = "Longitude" binding = "Latitude1" chart-type = "@chartType" stacking = "@stacking" id = "@demoSettingsModel.ControlId" height = "400px" width = "500px" legend-position = "Top" > < c1-items-source source-collection = "Model" /> < c1-flex-radar-series name = "Latitude1" /> < c1-flex-radar-series name = "Latitude2" binding = "Latitude2" /> </ c1-flex-radar > @section Description{ < p > @Html .Raw(FlexRadarRes.Polar_Text0)</ p > } |