RadialGauge
RadialGauge
Automatic Scaling
Features
Sample
Settings
Description
This example demonstrates how to use the startAngle, sweepAngle, and autoScale properties with the RadialGauge controls.
Source
AutoScaleController.cs
using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; using MvcExplorer.Models; namespace MvcExplorer.Controllers { public partial class RadialGaugeController : Controller { public ActionResult AutoScale() { ViewBag.DemoSettings = true; ViewBag.DemoSettingsModel = new ClientSettingsModel { Settings = CreateAutoScaleSettings() }; return View(); } private static IDictionary<string, object[]> CreateAutoScaleSettings() { var settings = new Dictionary<string, object[]> { {"SweepAngle", new object[]{90, 180, 270, 360}}, {"StartAngle", new object[]{0, 90, 180, 270, 360}}, {"AutoScale", new object[]{true, false}} }; return settings; } } }
AutoScale.cshtml
@{ ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel; } <c1-radial-gauge id="@demoSettingsModel.ControlId" min="0" max="10" value="5" sweep-angle="90" height="200px" width="500px" start-angle="0" auto-scale="true"> </c1-radial-gauge> @section Description{ @Html.Raw(RadialGaugeRes.AutoScale_Text0) }
Documentation