or
var pictures = [{ type: "JPG", len: 20, wid: 15, appr: 17.5, count: 2 },{ type: "JPG", len: 22, wid: 17, appr: 12.5, count: 3 },{ type: "JPG", len: 24, wid: 15, appr: 10.5, count: 1 },{ type: "JPG", len: 22, wid: 4, appr: 17.5, count: 6 },{ type: "PNG", len: 20, wid: 15, appr: 17.5, count: 4 },{ type: "PNG", len: 25, wid: 7, appr: 9.5, count: 4 },{ type: "PNG", len: 21, wid: 11, appr: 21.5, count: 1 }];var dataSource = new kendo.data.DataSource({data: pictures,group: {field: "type",aggregates: [{ field: "len", aggregate: "sum" },{ field: "wid", aggregate: "sum" }]}});dataSource.read();var seriesA = [],seriesB = [],categories = [],items = dataSource.view(),length = items.length,item;for (var i = 0; i < length; i++) {item = items[i];seriesA.push(item.aggregates.wid.sum);seriesB.push(item.aggregates.len.sum);}1.<div id="page_test" data-role="view" data-title="Test" data-before-show="beforeshow()" data-show="show()">2. <div class="view-content">3. Test!4. </div>5.</div>1.function beforeshow() {2. alert('beforeshow');3.}4. 5.function show() {6. alert('show');7.}