1var AnalyticsHelper = new function () { 2 this.InitDailyAcceptedChart = function () { 3 if ($("#analysticWidgetBody").length < 1) 4 return false; 5 $.ajax({ 6 method: "POST", 7 url: "/" + languageUI + "/Analytics/Daily" 8 }).done(function (chartData) { 9 var chart = AmCharts.makeChart("analysticWidgetBody", { 10 "type": "stock", 11 "theme": "light", 12 "language": "ru", 13 "dataSets": [{ 14 "color": "#5C6F7C", 15 "fieldMappings": [{ 16 "fromField": "value", 17 "toField": "value" 18 }, { 19 "fromField": "volume", 20 "toField": "volume" 21 }], 22 "dataProvider": chartData, 23 "categoryField": "date", 24 25 }], 26 "panels": [{ 27 "title": "ÐÑÑппиÑовка по даÑе пÑинÑÑÐ¸Ñ (кол-во)", 28 "stockGraphs": [{ 29 "id": "g1", 30 "valueField": "value" 31 }], 32 "stockLegend": { 33 "valueTextRegular": " ", 34 "markerType": "none" 35 } 36 }], 37 "chartScrollbarSettings": { 38 "graph": "g1" 39 }, 40 "chartCursorSettings": { 41 "valueBalloonsEnabled": true, 42 "graphBulletSize": 1, 43 "valueLineBalloonEnabled": true, 44 "valueLineEnabled": true, 45 "valueLineAlpha": 0.5 46 }, 47 "periodSelector": { 48 "periods": [{ 49 "period": "DD", 50 "count": 10, 51 "label": "10 дней" 52 }, { 53 "period": "MM", 54 "count": 1, 55 "label": "1 меÑÑÑ" 56 }, { 57 "period": "YYYY", 58 "count": 1, 59 "label": "1 год" 60 }, { 61 "period": "YTD", 62 "label": "YTD" 63 }, { 64 "period": "MAX", 65 "label": "ÐÐÐС" 66 }] 67 }, 68 69 "panelsSettings": { 70 "usePrefixes": true 71 }, 72 "export": { 73 "enabled": true 74 } 75 }); 76 $('.analytics-href').find('.underline').removeClass('underline-active-blue'); 77 $('.underline-daily').addClass('underline-active-blue'); 78 }); 79 80 } 81 82 this.InitPartial = function (href, hrefClassName) { 83 $.ajax({
84 url: '/'+languageUI+href 85 }).done(function (output) { 86 $("#analysticWidgetBody").html(output); 87 //TODO: вÑеменно оÑклÑÑили 88 AnalyticsHelper.InitByRegion(); 89 //AnalyticsHelper.InitByDocType(); 90 AnalyticsHelper.InitByStatus(); 91 }); 92 93 $('.analytics-href').find('.underline').removeClass('underline-active-blue'); 94 $('.' + hrefClassName).addClass('underline-active-blue'); 95 return false; 96 } 97 98 this.InitByDocType = function () { 99 if ($("#doc-types-chart").length < 1) 100 return false; 101 var data = $(".form-analyticsByFormType").serialize(); 102 //console.info(data); 103 $.ajax({ 104 method: "POST", 105 url: "/" + languageUI + "/Analytics/ByFormType", 106 data: data 107 }).done(function (chartData) { 108 var chart = AmCharts.makeChart("doc-types-chart", { 109 "type": "pie", 110 "startDuration": 0, 111 "labelText": "", 112 "theme": "light", 113 "addClassNames": true, 114 "legend": { 115 "position": "right" 116 }, 117 "innerRadius": "30%", 118 "balloonText": "[[value]]", 119 "balloon": { 120 "drop": true, 121 "adjustBorderColor": false, 122 "color": "#FFFFFF", 123 "fontSize": 16 124 }, 125 "defs": { 126 "filter": [{ 127 "id": "shadow", 128 "width": "200%", 129 "height": "200%", 130 "feOffset": { 131 "result": "offOut", 132 "in": "SourceAlpha", 133 "dx": 0, 134 "dy": 0 135 }, 136 "feGaussianBlur": { 137 "result": "blurOut", 138 "in": "offOut", 139 "stdDeviation": 5 140 }, 141 "feBlend": { 142 "in": "SourceGraphic", 143 "in2": "blurOut", 144 "mode": "normal" 145 } 146 }] 147 }, 148 "dataProvider": chartData, 149 "valueField": "count", 150 "titleField": "title", 151 "export": { 152 "enabled": true 153 } 154 }); 155 }); 156 } 157 158 this.ClickRegionLabel = function (dataItem, event) { 159 //window.location.href = '/' + languageUI + '/Document/LastDocuments?year=' + $('.year').val() + '®ionName=' + dataItem.title +'&rangeType=0'; 160 window.location.href = '/' + languageUI + '/Document/LastDocuments?year=' + $('.year').val() + '®ionCode=' + dataItem.dataContext.code + '&rangeType=0'; 161 event.stopPropagation(); 162 return false; 163 } 164 165 this.InitByRegion = function () { 166 if ($("#region-chart").length < 1) 167 return false; 168 var data = $(".form-analyticsByRegion").serialize(); 169 $.ajax({
170 method: "POST", 171 url: "/" + languageUI + "/Analytics/ByRegion", 172 data: data 173 }).done(function (chartData) { 174 //console.log("data = " + data); 175 var chart = AmCharts.makeChart("region-chart", { 176 "type": "pie", 177 "labelText": "", 178 "startDuration": 0, 179 "theme": "light", 180 "addClassNames": true, 181 "legend": { 182 "position": "right", 183 "clickLabel": AnalyticsHelper.ClickRegionLabel, 184 "clickMarker": AnalyticsHelper.ClickRegionLabel 185 }, 186 "innerRadius": "30%", 187 "thousandsSeparator": "", 188 "defs": { 189 "filter": [{ 190 "id": "shadow", 191 "width": "200%", 192 "height": "200%", 193 "feOffset": { 194 "result": "offOut", 195 "in": "SourceAlpha", 196 "dx": 0, 197 "dy": 0 198 }, 199 "feGaussianBlur": { 200 "result": "blurOut", 201 "in": "offOut", 202 "stdDeviation": 5 203 }, 204 "feBlend": { 205 "in": "SourceGraphic", 206 "in2": "blurOut", 207 "mode": "normal" 208 } 209 }] 210 }, 211 "dataProvider": chartData, 212 "valueField": "count", 213 "titleField": "title", 214 "export": { 215 "enabled": true 216 }, 217 "listeners": [{ 218 "event": "clickSlice", 219 "method": function (e) { 220 } 221 }] 222 }); 223 }); 224 } 225 226 this.InitByStatus = function () { 227 if ($("#status-chart").length < 1) 228 return false; 229 var data = $(".form-analyticsByStatus").serialize(); 230 //console.info(data); 231 $.ajax({
232 method: "POST", 233 url: "/" + languageUI + "/Analytics/ByStatus", 234 data: data 235 }).done(function (chartData) { 236 var chart = AmCharts.makeChart("status-chart", { 237 "type": "serial", 238 "theme": "light", 239 "dataProvider": chartData, 240 "thousandsSeparator": "", 241 "valueAxes": [ { 242 "gridColor": "#FFFFFF", 243 "gridAlpha": 0.2, 244 "dashLength": 0 245 } ], 246 "gridAboveGraphs": true, 247 "startDuration": 1, 248 "graphs": [ { 249 "balloonText": "[[title]]: <b>[[value]]</b>", 250 "fillAlphas": 0.8, 251 "lineAlpha": 0.2, 252 "type": "column", 253 "valueField": "count" 254 } ], 255 "chartCursor": { 256 "categoryBalloonEnabled": false, 257 "cursorAlpha": 0, 258 "zoomable": false 259 }, 260 "categoryField": "title", 261 "export": { 262 "enabled": true 263 } 264 }); 265 }); 266 } 267}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.