BulletGraph
BulletGraph
Editing Values
Features
Sample
Settings
Description
This example demonstrates how to use the isReadOnly and step properties with the BulletGraph controls.
Source
EditingController.cs
using Microsoft.AspNetCore.Mvc;
using System.Collections.Generic;
using MvcExplorer.Models;
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;
}
}
}
Editing.cshtml
@{
ClientSettingsModel demoSettingsModel = ViewBag.DemoSettingsModel;
}
<c1-bullet-graph id="@demoSettingsModel.ControlId" min="0" max="10" good="3" bad="4" value="5" target="6" format="" is-read-only="false" step="0.5" show-text="All" width="500px">
</c1-bullet-graph>
@section Description{
@Html.Raw(BulletGraphRes.Editing_Text0)
}
Documentation