RadialGauge
RadialGauge
Using Ranges
This example demonstrates how to use ranges with RadialGauge.
Features
Settings
Show Ranges: True
Description
This example demonstrates how to use ranges with RadialGauge.
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 MvcExplorer.Models; using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; namespace MvcExplorer.Controllers { public partial class RadialGaugeController : Controller { public ActionResult Ranges() { ViewBag.DemoSettings = true ; ViewBag.DemoSettingsModel = new ClientSettingsModel { Settings = CreateShowRangesSettings() }; return View(); } private static IDictionary< string , object []> CreateShowRangesSettings() { var settings = new Dictionary< string , object []> { { "ShowRanges" , new object []{ true , false }} }; return settings; } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | @ { ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel; } @ (Html.C1().RadialGauge().Id(demoSettingsModel.ControlId) .Min(0).Max(10).Value(5) .Ranges(items => items .Add(item => item.Min(2).Max(3).Color(System.Drawing.Color.Green)) .Add(item => item.Min(6).Max(9).Color(System.Drawing.Color.Yellow)) ) .Width(300).Height(180) ) @section Description{ @Html .Raw(Resources.RadialGauge.Ranges_Text0) } |