BulletGraph
値の表示
機能
サンプル
設定
説明
この例は、BulletGraph コントロールで ShowText プロパティを使用する方法を示します。
ソース
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 BulletGraphController : 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().BulletGraph().Id(demoSettingsModel.ControlId)
.Min(0).Max(10).Good(3)
.Bad(4).Value(5).Target(6)
.ShowText(ShowText.All).Width(500)
)
@section Description{
@Html.Raw(Resources.BulletGraph.ShowText_Text0)
}
マニュアル