| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 | $(function() {    "use strict";    BWA.ChartOptions = BWA.ChartOptions || {};    var A = BWA.ChartOptions.MainDashBoard = BWA.ChartOptions.MainDashBoard || {};    A.getUsageRatioByEnergyChartOptions = function() {        return {            palette: "Default",            legend: {                horizontalAlignment: "center",                verticalAlignment: "bottom",                margin: 10,                border: {                    visible: true                }            },            tooltip: {                enabled: true,                format: 'fixedPoint',                precision: 2,                customizeTooltip: function(point) {                    return {                        text: [this.argumentText, ': ', this.valueText].join('')                    };                }            },            pointClick: function(point) {                point.select();            },            series: [                {                    type: "doughnut",  // if not, pie.                    argumentField: "energy",                    valueField: "value",                    hoverStyle: {                        color: "#ffd700"                    },                    label: {                        format: 'fixedPoint',                        precision: 2,                        visible: true,                        connector: {                            visible: true                        },                        customizeText: function(pointInfo) {                            //return pointInfo.argumentText;                            return pointInfo.percentText; //                         }                    }                }            ]        };    };});
 |