Passing local data to the chart. I pass the following class to the model of the partial view:
public
class
DonutChartDetails
{
public
string
Name {
get
;
set
; }
public
string
Title {
get
;
set
; }
public
IEnumerable<DashValue> Items {
get
;
set
; }
public
Boolean ShowLabel {
get
;
set
; }
}
public
class
DashValue
{
[Key]
[Required]
[DisplayName(
"DashItem"
)]
public
string
category {
get
;
set
; }
[Required]
[DisplayName(
"DashValue"
)]
public
decimal
value {
get
;
set
; }
//[DisplayName("DashDetail")]
//public string dashDetail { get; set; }
}
Here's the code for the chart:
@model DonutChartDetails
<
div
style
=
"background-color:transparent;"
>
@(Html.Kendo().Chart(Model.Items)
.Name(Model.Name)
.Title(Model.Title)
.Legend(legend => legend.Position(ChartLegendPosition.Top)
)
.Series(series =>
{
series.Donut(model => model.value, model => model.category);
})
)
</
div
>
Any ideas as to why no data is showing... The Title is showing.
-Lester