BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
[HomeController.cs]
public ActionResult Index()
{
Datasource for tooltip
ViewBag.dataSource = Election_Result.GetUSPopulationData();
//...
return View();
}
[Index.cshtml]
Template for tooltip
<div id="template" style="display:none">
<div class="toolback">
<div class="listing1">
<center>
State: ${name}
</center>
</div>
<div class="listing1">
<center>
Population: ${population}
</center>
</div>
</div>
</div>
@Html.EJS().Maps("container").Layers(layer =>
{
layer.DataSource(ViewBag.dataSource).TooltipSettings(new MapsTooltipSettings{ Visible = true, Template = "#template", ValuePath = "name" }).
}).Render()
|
[Index.cshtml]
<script id="template" type="application/jsrender">
<div class="tip">
<p class="small">
<label style="color:white;font-size:11px;font-weight:normal;">{{:name}}</label>
</p>
<p class="big">
<label style="color:white;font-size:11px;font-weight:normal;">{{:population}} veces</label>
</p>
</div>
</script>
|