BulletGraph
BulletGraph
Displaying Values
Features
Sample
Settings
Description
This example demonstrates how to use the showText property with the BulletGraph 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 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) }
Documentation