Hello, currently i have this and it works great.. What i need is for the Categories in CategoryAxis to be dynamicand not the static .Categories("1", "2", "3", "4", "5")..
I already have the value i want to put in there coming from my model, its "@item.SurveyLinearCounts.FirstOrDefault().Min" for the minimum value and @item.SurveyLinearCounts.FirstOrDefault().Max" for the maximum
How do i do this.?
@(Html.Kendo().Chart<AnalyzeResponseViewModel>().Name(@item.SurveyQuestionID.ToString())
.Legend(legend => legend
.Position(ChartLegendPosition.Top)
.Visible(true)
)
.ChartArea(chartArea => chartArea
.Background("transparent")
)
.Series(series =>
{
series.Column(model => model.ResponseCount).Name("Count").Tooltip(tooltip => tooltip.Visible(true).Template("#= series.name #: #= value #"));
})
.CategoryAxis(axis => axis
.Categories("1", "2", "3", "4", "5")
.MajorGridLines(lines => lines.Visible(false))
)
.
)
.ValueAxis(axis => axis
.Numeric()
.Line(line => line.Visible(false))
.MajorGridLines(lines => lines.Visible(true))
)
.DataSource(ds => ds
.Read(read => read.Action("GetSurveyResponseChart", "DataSource", new { item.SurveyQuestionID })))
.Tooltip(tooltip => tooltip.Visible(true).Template("#= series.name #: #= value #")))