Skip to content

Instantly share code, notes, and snippets.

@isaacrlevin
Last active June 15, 2020 23:26
Show Gist options
  • Save isaacrlevin/fa17cb0e0d23478d1f36854f2974abdf to your computer and use it in GitHub Desktop.
Save isaacrlevin/fa17cb0e0d23478d1f36854f2974abdf to your computer and use it in GitHub Desktop.
Telerik
@using Microsoft.AspNetCore.Authentication
@model TrafficViewModel
<div class="demo-section k-content wide">
@(Html.Kendo().Chart(Model.CloneSummary.Clones)
.Name("chart")
.Title("Internet Users in United States")
.Legend(legend => legend.Visible(false))
.Series(series => {
series.Line(model => model.Count)
.CategoryField("TimeStamp")
.Labels(labels => labels.Format("{0}").Visible(true));
})
.CategoryAxis(axis => axis
.MajorGridLines(lines => lines.Visible(false))
)
.ValueAxis(axis => axis
.Labels(labels => labels.Format("{0}"))
.Line(lines => lines.Visible(false))
)
)
</div>
// This is the object that I set to source
public class RepositoryTrafficClone
{
public DateTimeOffset Timestamp
{
get;
protected set;
}
public int Count
{
get;
protected set;
}
public int Uniques
{
get;
protected set;
}
internal string DebuggerDisplay => string.Format(CultureInfo.InvariantCulture, "Number: {0} Uniques: {1}", Count, Uniques);
public RepositoryTrafficClone()
{
}
public RepositoryTrafficClone(DateTimeOffset timestamp, int count, int uniques)
{
Timestamp = timestamp;
Count = count;
Uniques = uniques;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment