I have a chart that is not populating. It is server binding
Any reason why it is not working? Any help would be appreciated. Thx
In The controller:
public
ActionResult FetchStates()
{
List
<State> states = new List<State>();
states = States.GetList();
return(states);
}
In View:
<%
= Html.Telerik().Chart<ALSCanada.EnviroLims.WebCel.Models.State>()
.Name(
"chart")
.Title(title => title
.Text(
"Bubble Tracking")
)
.Legend(legend => {
legend.Border(1,
"black").Margin(10);
legend.Position(
ChartLegendPosition.Top);
})
.SeriesDefaults(defaults => {
defaults.Column().Stack(
true);
})
.Series(series => {
series.Column(s => s.S).Name(
"S");
series.Column(s => s.W).Name(
"W");
series.Column(s => s.A).Name(
"A");
})
.HtmlAttributes(
new { style = "width: 400px; height: 300px"})
.CategoryAxis(axis => axis
.Categories(s=> s.ID)
)
%>
ALso if I click on a chart stack is there a way to get the ID from the category for the stack in a chart event?
Thx P