RadialGauge
RadialGauge
Displaying Values
Features
Sample
Settings
Description
This example demonstrates how to use the ShowText property with the RadialGauge control.
Source
ShowTextController.cs
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 ShowText() { ViewBag.DemoSettings = true; ViewBag.DemoSettingsModel = new ClientSettingsModel { Settings = CreateShowTextSettings() }; return View(); } private static IDictionary<string, object[]> CreateShowTextSettings() { var settings = new Dictionary<string, object[]> { {"ShowText", new object[]{"All", "Value", "MinMax", "None"}} }; return settings; } } }
ShowText.cshtml
@{ ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel; } @(Html.C1().RadialGauge().Id(demoSettingsModel.ControlId) .Min(0).Max(10).Value(5) .ShowText(ShowText.All).Width(300).Height(180) ) @section Description{ @Html.Raw(Resources.RadialGauge.ShowText_Text0) }
Documentation