TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Cassie Mod
NA
488
71.3k
call script function in asp.net mvc
Jan 26 2016 10:55 AM
hi,
I've got the following index.html wich creates a chart. however for the ammount i need to call a function, but can somebody tell me how ???
thnx
<!-----<< ### SCRIPT ### >>------->
<script>
var data = function refreshData() {
var grid = $("#CollectorGrid").data("kendoGrid");
grid.dataSource.read();
var count = grid.dataSource.total();
$("#countElement").val(count);
}
$(document).ready(function () {
var collectors = [{
"source": "Completed",
"ammount": 3 // -- > how can i call the function ?? if i use data it is empty
}, {
"source": "Failed",
"ammount": 112 // same here
}];
var datadatafiles = [{
"source": "Completed",
"percentage": 200
}, {
"source": "Failed",
"percentage": 400
}];
$("#collectorstatistics").kendoChart({
legend: {
position: "bottom"
},
dataSource: {
data: dat
},
series: [{
type: "donut",
field: "ammount",
categoryField: "source"
}],
chartArea: {
background: "none"
},
tooltip: {
visible: true,
template: "${ category } - ${ value } Collectors"
}
});
$("#datafilesstatistics").kendoChart({
legend: {
position: "bottom"
},
dataSource: {
data: datadatafiles
},
series: [{
type: "donut",
field: "percentage",
categoryField: "source"
}],
chartArea: {
background: "none"
},
tooltip: {
visible: true,
template: "${ category } - ${ value } Datafiles"
}
});
$("#collectorscompleted").kendoChart({
legend: {
visible: false
},
seriesDefaults: {
type: "column"
},
series: [{
name: "Users Reached",
data: [340, 894, 1345, 1012, 3043, 2013 ]
}, {
name: "Applications",
data: [50, 80, 120, 203, 324, 297]
}],
valueAxis: {
labels: {
visible: false
},
line: {
visible: false
},
majorGridLines: {
visible: false
}
},
categoryAxis: {
categories: [2002, 2003, 2004, 2005, 2006, 2007],
line: {
visible: false
},
majorGridLines: {
visible: false
}
},
chartArea: {
background: "none"
},
tooltip: {
visible: true,
format: "{0}",
template: "#= series.name #: #= value #"
}
});
$("#datafilescompleted").kendoChart({
legend: {
visible: false
},
seriesDefaults: {
type: "column"
},
series: [{
name: "Users Reached",
data: [340, 894, 1345, 1012, 3043, 2013]
}, {
name: "Applications",
data: [50, 80, 120, 203, 324, 297]
}],
valueAxis: {
labels: {
visible: false
},
line: {
visible: false
},
majorGridLines: {
visible: false
}
},
categoryAxis: {
categories: [2002, 2003, 2004, 2005, 2006, 2007],
line: {
visible: false
},
majorGridLines: {
visible: false
}
},
chartArea: {
background: "none"
},
tooltip: {
visible: true,
format: "{0}",
template: "#= series.name #: #= value #"
}
});
});
Reply
Answers (
1
)
Instead of XML,I want to insert data using JSON to SQL Table
Display Items in table format