or
Html.Kendo().Chart<
AccountPerformance
>(Model.Results)
.Name("chartPCT")
.Title("% Return")
.Legend(legend => legend.Visible(false))
.Series(series =>
series.Column(model => model.Metrics.Return)
.Name(Model.ColumnTitle)
.Labels(false))
.ValueAxis(axis => axis
.Numeric()
.Labels(labels => labels.Format("{0}%")))
.CategoryAxis(axis => axis
.Date()
.MajorGridLines(builder => builder.Visible(false))
.Categories(model => model.ObservationDate)
.Labels(labels => labels.Format("MMM")))
.SeriesDefaults(builder => builder.Column().NegativeColor("#BE2D55").Color("#C0BD7F"))
.Tooltip(tooltip => tooltip
.Visible(true)
.Color("white")
.Background("black")
.Format("{0:P2}")
.Template("#= value #")
)
.Render();
<
div
data-role
=
"grid"
data-sortable
=
"true"
data-editable
=
"true"
data-columns
=
"source: myColumns"
data-bind
=
"source: entities"
data-row-template
=
"rowTemplate"
></
div
>
var
event_datasource =
new
kendo.data.DataSource({
transport: {
read: {
url:
"/event/datawidget"
,
dataType:
"json"
,
type:
"POST"
},
parameterMap:
function
(data) {
return
kendo.stringify(data);
}
},
schema: {
data:
"data"
,
total:
"total"
,
model: {
id:
"event_id"
,
fields: {
event_id: { type:
"number"
},
description: { type:
"string"
}
}
}
},
sort: { field:
"description"
, dir:
"desc"
}
pageSize: 10,
serverFiltering:
true
,
serverPaging:
true
});
var
event_widget = $(
"#event_id"
).kendoComboBox({
dataTextField:
"description"
,
dataValueField:
"event_id"
,
filter:
"contains"
,
minLength: 2,
dataSource: event_datasource,
placeholder:
"Select an event"
,
value:
'99'
,
text:
'Some event'
,
change :
function
(e) {
if
(
this
.value() &&
this
.selectedIndex == -1)
this
.value(
null
);
// clears the selection when an invalid selection was made
},
autoBind: false
}).data(
'kendoComboBox'
);
Html.Kendo().Window()
.Name(windowId)
.Width(680)
.Height(430)
.Title(Model.ChartTitle)
.Visible(false)
.Modal(true)
.Draggable(true)
.Animation(animation => { animation.Open(open => { open.Fade(FadeDirection.In); }); })
01.
function onCommitmentEdit(e) {
02.
console.log("onCommitmentEdit");
03.
//debugger;
04.
var cell = e.container;
05.
06.
var $bigStringEditor = cell.find(".big-string-editor");
07.
08.
if ($bigStringEditor.length == 1) {
09.
$bigStringEditor.keydown(function (ev) {
10.
stop(ev);
11.
});
12.
13.
14.
$bigStringEditor.mousedown(function (ev) {
15.
if (ev.button == 0) {
16.
ev.stopPropagation();
17.
}
18.
});
19.
20.
}
21.
22.
//debugger;
23.
switch (cell[0].cellIndex) {
24.
case PROJECT_COLUMN:
25.
//only enabled if Type = "Separately Budgeted"
26.
if (e.model.CommitmentTypeId != 3) {
27.
this.closeCell();
28.
}
29.
break;
30.
case OFF_TRACK_IMPLICATION_COLUMN:
31.
//only enabled if Execution is "Behind" or "Failing", or Budget= "Over"
32.
if (e.model.CommitmentStatusTypeId != 3 && e.model.CommitmentStatusTypeId != 4 && e.model.BudgetStatusTypeId != 1) {
33.
this.closeCell();
34.
}
35.
break;
36.
case DEPARTMENTS_INVOLVED_COLUMN:
37.
//only enabled if Cross Department = True
38.
if (!e.model.CrossDepartment) {
39.
this.closeCell();
40.
}
41.
break;
42.
case CANCEL_OK_COLUMN:
43.
//only enabled if Execution is "Cancelled"
44.
if (e.model.CommitmentStatusTypeId != 6) {
45.
this.closeCell();
46.
}
47.
break;
48.
49.
}
50.
e.model.SubGroupId = getSubGroupIdVal();
51.
e.model.DashboardId = getDashBoardIdVal();
52.
53.
}