$(document).ready(
function
() {
$(
"#menu"
).kendoMenu({
dataSource: [
{
text:
"Menu Item 1"
,
items: [
{ text:
"Sub Menu Item 1"
},
{ text:
"Sub Menu Item 2"
}
]
},
{
text:
"Menu Item 2"
}
]
})
});
<
ul
id
=
"menu"
class
=
"k-widget k-reset k-header k-menu k-menu-horizontal"
></
ul
>
{edit} I was able to display a chart in IE8 but only if I copied my script/html into a .HTM file. If I run the same "code" in an ASPX file within my asp.net application it fails within one of the .js files. Does this mean that this particular set of lightweight UI controls would not work using asp.net?
var graphData = new kendo.data.DataSource( {
transport: {
read: {
type:
"POST",
url:
"data_reader_webservice.asmx/GetDataJSON",
data: { DeviceID: $(
"#deviceList").data("kendoDropDownList").value(),
ParameterID: $(
"#parameterList").data("kendoDropDownList").value(),
startDate: $(
"#startDate").data("kendoDatePicker").value(),
endDate: $(
"#stopDate").data("kendoDatePicker").value()
},
contentType:
"application/json; charset=utf-8",
dataType:
"json"
},
parameterMap:
function (options) {
return JSON.stringify(options);
}
},
schema: {
data:
"d",
model: {
fields: {
ParameterID: { type:
"string" },
ParameterName: { type:
"string" }
}
}
},
error:
function (e) {
alert(e[0].responseText);
}
});
graphData.read();
$(
"#chart_test").kendoChart({
title: { text:
"Tha Chart!" },
chartArea: { width: 600, height: 400 },
seriesDefaults: { type:
"pie" },
dataSource: graphData,
series: [{field:
"ParameterValue", name: "value"}],
categoryAxis: { field:
"DeviceID", name: "id" }
});
<
a
href
=
"#"
data-role
=
"button"
data-icon
=
"add"
data-style
=
"notext"
></
a
>
$(
'#parking-filter-select'
).kendoDropDownList({
dataSource: usageData,
change:
function
(e) {
var
value = $(
'#parking-filter-select'
).val();
var
chart = $(
'#chart-utilization'
).data(
"kendoChart"
);
chart.dataSource =
new
kendo.data.DataSource({
data: usageData[value].Usage
});
chart.refresh();
}
});
$(
'#chart-utilization'
).kendoChart({
title: {
text:
"Parking utilization for week"
},
dataSource:{
data: usageData[0].Usage
},
series:[{
type:
"column"
,
field:
"Max"
,
name:
"Max utilization"
}],
categoryAxis:{
field:
"Week"
},
tooltip: {
visible:
true
,
template:
"${ Max } of ${ Capacity }"
},
legend: {
visible:
false
}
});
Posted 13 minutes ago (permalink)