BulletGraph
BulletGraph
Editing Values
This example demonstrates how to use the isReadOnly and step properties with the BulletGraph control.
Features
Settings
Is Read Only: False
Step: 0.5
Description
This example demonstrates how to use the isReadOnly and step properties with the BulletGraph control.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 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 Editing() { ViewBag.DemoSettings = true ; ViewBag.DemoSettingsModel = new ClientSettingsModel { Settings = CreateEditingSettings() }; return View(); } private static IDictionary< string , object []> CreateEditingSettings() { var settings = new Dictionary< string , object []> { { "IsReadOnly" , new object []{ false , true }}, { "Step" , new object []{0.5, 1, 2}} }; return settings; } } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 | @ { ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel; } @ (Html.C1().BulletGraph().Id(demoSettingsModel.ControlId) .Min(0).Max(10).Good(3).ShowText(ShowText.All) .Bad(4).Value(5).Target(6).Format( "" ) .IsReadOnly( false ).Step(0.5).Width(500) ) @section Description{ @Html .Raw(Resources.BulletGraph.Editing_Text0) } |