RadialGauge
自動スケーリング
機能
サンプル
設定
説明
この例は、StartAngle、SweepAngle、AutoScale の各プロパティを RadialGauge コントロールで使用する方法を示します。
ソース
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)
}
マニュアル