RadialGauge
RadialGauge
Automatic Scaling
Features
Sample
Settings
Description
This example demonstrates how to use the startAngle, sweepAngle, and autoScale properties with the RadialGauge control.
Source
AutoScaleController.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 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;
}
@(Html.C1().RadialGauge().Id(demoSettingsModel.ControlId)
.Min(0).Max(10).Value(5)
.SweepAngle(90).StartAngle(0)
.AutoScale(true).Height(200).Width(500)
)
@section Description{
@Html.Raw(Resources.RadialGauge.AutoScale_Text0)
}
Documentation