0๐
โ
I was able to get this working using the @Html.Raw
and String.Join
on the commas. I also added ticks to surround the Month string like 'Jan'
.
Below is a sample of what I did.
data: {
labels: [@Html.Raw("'" + String.Join("','", (Model.lstObjects.Select(x => x.RecordMonth).ToList())) + "'")],
Source:stackexchange.com