• filter过滤


    (function () {
        appModule.controller('app.views.international.policy.flux.index', [
            '$scope', 'uiGridConstants', 'abp.services.app.sabreFlowStatistics','$filter',
            function($scope, uiGridConstants, sabreFlowStatisticsService, $filter) {
                var vm = this;
                vm.batchQueryParams = {};
                vm.options = {
                    chart: {
                        type: 'discreteBarChart',
                        height: 350,
                        x: function(d) { return d.date; },
                        y: function(d) { return d.count; },
                        showValues: true,
                        valueFormat: function(d) { return d; },
                        yAxis: {
                            axisLabel: '流量数',
                            tickFormat: function(d) {
                                return d3.format(',f')(d);
                            }
                        }
                    }
                };
                vm.data = [
                    {
                        key: "FlowCount",
                        values: []
                    }
                ];
                //航司流量统计饼状图
                vm.optionsCarrier = {
                    chart: {
                        type: 'pieChart',
                        height: 350,
                        x: function(d) { return d.carrier; },
                        y: function(d) { return d.count; },
                        showLabels: true,
                        labelThreshold: 0.01,
                        labelSunbeamLayout: true,
                        duration: 500,
                        valueFormat: function(d) { return d; },
                        yAxis: {
                            axisLabel: '流量数',
                            tickFormat: function(d) {
                                return d3.format(',f')(d);
                            }
                        }
                    }
                };
                vm.dataCarrier = [
                    {
                        key: "FlowCount",
                        values: []
                    }
                ];
                //航线流量统计柱状图
                vm.optionsAirline = {
                    chart: {
                        type: 'discreteBarChart',
                        height: 350,
                        x: function (d) { return $filter('lineFilter')(d.airline,'-') },航线分隔:pek-sha
                        y: function(d) { return d.count; },
                        showValues: true,
                        valueFormat: function(d) { return d; },
                        yAxis: {
                            axisLabel: '流量数',
                            tickFormat: function(d) {
                                return d3.format(',f')(d);
                            }
                        },
                        dispatch: {
                            //tooltipShow: function (e) { console.log('! tooltip SHOW !') },
                            //tooltipHide: function (e) { console.log('! tooltip HIDE !') },
                            //beforeUpdate: function (e) { console.log('! before UPDATE !') }
                        
                        },
                        discretebar: {
                            dispatch: {
                                ////chartClick: function(e) {console.log("! chart Click !")},
                                //elementClick: function (e) { console.log("! element Click !") },
                                //elementDblClick: function (e) { console.log("! element Double Click !") },
                                //elementMouseout: function (e) { console.log("! element Mouseout !") },
                                //elementMouseover: function (e) { console.log("! element Mouseover !") }
                            
                            }
                        },
                        callback: function(e) {
                            //console.log('! callback !');
                        }
                    }
                };
    

      

  • 相关阅读:
    NaN数值类型
    模板字符串
    一文带你速懂虚拟化KVM和XEN
    CentOS 8配置本地yum源及DNF简介
    fxksmdb.exe 是什么进程?
    入行IT,一定要会Linux吗?
    干货|Linux平台搭建网关服务器
    忘带U盘了??别急!一行python代码即可搞定文件传输
    手把手教你如何搭建一个私有云盘
    误删重要文件怎么办?学会Linux 救援模式再也不担心
  • 原文地址:https://www.cnblogs.com/baihb/p/6731970.html
Copyright © 2020-2023  润新知