Chart Sorting
by grippstick
HTML
<link rel="stylesheet" href="http://babackofficedev.radolo.com/kendo/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://babackofficedev.radolo.com/Kendo/Styles/kendo.flat.min.css">
<script src="http://babackofficedev.radolo.com/Kendo/js/jquery.min.js"></script>
<script src="http://babackofficedev.radolo.com/Kendo/js/kendo.all.min.js"></script>
<div id='container'>
<div>
<label>Report Date
<input data-role="datepicker" data-bind='value:ReportDate,events:{change:changeDate}' />
</label>
<button data-bind='click:showAll'>Show All</button>
<button data-bind='click:hideAll'>Hide All</button>
</div>
<div id="chart"></div>
</div>
JavaScript
$().ready(function () {
var $chart = $("#chart");
var vm = new kendo.observable({
ReportDate: new Date(),
showAll: function (e) {
var chart = $chart.getKendoChart();
$.each(chart.options.series, function (index, item) {
item.visible = true;
});
chart.redraw();
},
hideAll: function (e) {
var chart = $chart.getKendoChart();
$.each(chart.options.series, function (index, item) {
item.visible = false;
});
chart.redraw();
},
dsActivity: new kendo.data.DataSource({
data: function () {
return {
"d": [{
"__type": "KeyValuePairOfstringdateTime:#System.Collections.Generic",
"key": "Sheri Theriault",
"value": "\/Date(1408101613133)\/"
}, {
"__type": "KeyValuePairOfstringdateTime:#System.Collections.Generic",
"key": "Sheri Theriault",
"value": "\/Date(1408101613270)\/"
}, {
"__type": "KeyValuePairOfstringdateTime:#System.Collections.Generic",
"key": "Sheri Theriault",
"value": "\/Date(1408101613647)\/"
}, {
"__type": "KeyValuePairOfstringdateTime:#System.Collections.Generic",
"key": "Sheri Theriault",
"value": "\/Date(1408101613703)\/"
}, {
"__type": "KeyValuePairOfstringdateTime:#System.Collections.Generic",
"key": "Michelle Williams",
"value": "\/Date(1408102013910)\/"
}, {
"__type":...