<div class="chart-wrapper"> @(Html.Kendo().Chart<ChartExample.Models.ChartModel>() .Name("chart") .Title("Example Column Chart") .Legend(legend => legend .Position(ChartLegendPosition.Top) ) .DataSource(ds => ds.Read(read => read.Action("GetChartData", "Charts"))) .Series(series => { series.Column(model => model.Val2).Name("Val2"); series.Column(model => model.Val3).Name("Val3"); }) .CategoryAxis(axis => axis .Categories(model => model.Year) .Labels(labels => labels.Rotation(-90)) ) .ValueAxis(axis => axis.Numeric() .Labels(labels => labels.Format("{0:N0}")) .MajorUnit(10000) ) ) </div>
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter