'use strict'; var app = angular.module('app', [ 'angularUtils.directives.dirPagination' ]); app.controller("totalCtrl", ["$scope", "$http", "$timeout", function ($scope, $http, $timeout) { var self = this; var s4 = new SM4Util(); self.userId = $.cookie("GlWorkPlatform-userid"); self.userName = $.cookie("GlWorkPlatform-chineseName"); self.get_AccessToken = localStorage.getItem("GlWorkPlatform-AccessToken"); self.get_lastReturnPageno = sp.getUrlName("lastReturnPageno"); var postCfg = { headers: { 'Content-Type': 'application/json', 'Authorization': "Bearer " + self.get_AccessToken } } self.getChart1 = function () { var data = [{ name: "10年", y: 150 }, { name: "30年", y: 92 }, { name: "永久", y: 52 }] var chart = new Highcharts.Chart({ chart: { renderTo: "chart1", type: 'pie', style: { position: 'relative', left: '-30px' } }, title: { text: '档案保管期限统计(卷)', //图表的标题 //margin: 80 }, tooltip: { pointFormat: '{point.name}: {point.y}卷' }, colors: ['#4A90E2', '#F5A623', '#FF8080', '#906EDB', '#758790'], legend: { align: 'center', verticalAlign: 'bottom', layout:'horizontal',// 'vertical', enabled: true, }, plotOptions: { pie: { allowPointSelect: true, cursor: 'pointer', size: 300, dataLabels: { enabled: true, distance: -50, //formatter: function () { // return this.point.name + ":" + this.y + "卷"; //} }, showInLegend: true } }, series: [{ name: "数量", data: data }], credits: { enabled: false//隐藏右下角网址 }, exporting: { enabled: false//隐藏右上角打印 } }) chart.setSize(null, 450) } self.getChart1() self.getChart2 = function () { var chart = new Highcharts.Chart({ chart: { renderTo: "chart2", type: 'column' }, title: { text: '档案年度数量统计(件)', //图表的标题 //margin: 80 }, tooltip: { headerFormat: '{point.key}
{series.name}: | ' + '{point.y}{series.className} |