git-svn-id: https://msi/svn/firstRepo/Management/trunk@49 0f545695-f87b-41b6-9a03-7f16563b5454
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='chartContainer1' style="width: 400px; height: 250px;">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div id='chartContainer2' style="width: 400px; height: 250px;">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div id='chartContainer3' style="width: 400px; height: 250px;">
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<!-- <div id='chartContainer4' style="width: 400px; height: 250px;">
|
||||
</div>-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,116 @@
|
||||
define(['jquery', 'underscore', 'backbone',
|
||||
'text!modules/statistics/statisticsViewTemplate.html',
|
||||
'text!modules/statistics/pieTabTemplate.html',
|
||||
'modules/base/baseView', 'controls/window/window', 'jqx'],
|
||||
function ($, _, Backbone, statisticsViewTemplate, pieTabTemplate, BaseView, Window) {
|
||||
|
||||
var StatisticsView = BaseView.extend({
|
||||
dataAdapter: undefined,
|
||||
//initialize template
|
||||
template: _.template(statisticsViewTemplate),
|
||||
editorRicetta: null,
|
||||
initialize: function () {
|
||||
StatisticsView.__super__.initialize.call(this);
|
||||
//this.header.title = "pippo";
|
||||
},
|
||||
//render the content into div of view
|
||||
render: function () {
|
||||
//this.header.title = "pippo";
|
||||
StatisticsView.__super__.render.call(this);
|
||||
var self = this;
|
||||
var chartSettings = {
|
||||
// source: new $.jqx.dataAdapter({
|
||||
// datatype: "jsonp",
|
||||
// datafields: [
|
||||
// {name: 'CountSerie', type: 'int'},
|
||||
// {name: 'Serie', type: 'string'}
|
||||
// ],
|
||||
// url: myManifest.Settings.DefaultURL + "/backend/statistics/gender"
|
||||
// }),
|
||||
title: '',
|
||||
//description: "Genere",
|
||||
enableAnimations: false,
|
||||
showLegend: true,
|
||||
showBorderLine: true,
|
||||
padding: {left: 5, top: 5, right: 5, bottom: 5},
|
||||
titlePadding: {left: 0, top: 0, right: 0, bottom: 10},
|
||||
colorScheme: 'scheme03',
|
||||
seriesGroups: [
|
||||
{
|
||||
type: 'pie',
|
||||
showLegend: true,
|
||||
enableSeriesToggle: true,
|
||||
series:
|
||||
[
|
||||
{
|
||||
dataField: 'CountSerie',
|
||||
displayText: 'Serie',
|
||||
showLabels: true,
|
||||
labelRadius: 160,
|
||||
labelLinesEnabled: true,
|
||||
labelLinesAngles: true,
|
||||
labelsAutoRotate: false,
|
||||
initialAngle: 0,
|
||||
radius: 125,
|
||||
minAngle: 0,
|
||||
maxAngle: 180,
|
||||
centerOffset: 0,
|
||||
offsetY: 170
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
var window = new Window({
|
||||
title: "Statistiche",
|
||||
width: "850px",
|
||||
resizable: true,
|
||||
height: "510px",
|
||||
maxHeight: 1000,
|
||||
maxWidth: 1000,
|
||||
content: _.template(pieTabTemplate),
|
||||
initContentFn: function () {
|
||||
chartSettings.source = new $.jqx.dataAdapter({
|
||||
datatype: "jsonp",
|
||||
datafields: [
|
||||
{name: 'CountSerie', type: 'int'},
|
||||
{name: 'Serie', type: 'string'}
|
||||
],
|
||||
url: myManifest.Settings.DefaultURL + "/backend/statistics/gender"
|
||||
});
|
||||
chartSettings.title = "Genere";
|
||||
$("#chartContainer1").jqxChart(chartSettings);
|
||||
|
||||
chartSettings.source = new $.jqx.dataAdapter({
|
||||
datatype: "jsonp",
|
||||
datafields: [
|
||||
{name: 'CountSerie', type: 'int'},
|
||||
{name: 'Serie', type: 'string'}
|
||||
],
|
||||
url: myManifest.Settings.DefaultURL + "/backend/statistics/typeAccess"
|
||||
});
|
||||
chartSettings.title = "Tipo Accessi";
|
||||
$("#chartContainer2").jqxChart(chartSettings);
|
||||
|
||||
chartSettings.source = new $.jqx.dataAdapter({
|
||||
datatype: "jsonp",
|
||||
datafields: [
|
||||
{name: 'CountSerie', type: 'int'},
|
||||
{name: 'Serie', type: 'string'}
|
||||
],
|
||||
url: myManifest.Settings.DefaultURL + "/backend/statistics/themesUsage"
|
||||
});
|
||||
chartSettings.title = "Temi Usati";
|
||||
$("#chartContainer3").jqxChart(chartSettings);
|
||||
}
|
||||
});
|
||||
window.id = "statistics";
|
||||
|
||||
this.$el.append(this.template());
|
||||
this.$el.find("#content").append(window.$el);
|
||||
window.render();
|
||||
return this;
|
||||
}
|
||||
});
|
||||
return StatisticsView;
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
<div id="content">
|
||||
</div>
|
||||
Reference in New Issue
Block a user