$(function() { "use strict"; BWA.ChartOptions = BWA.ChartOptions || {}; var A = BWA.ChartOptions.CenterMainDashboard = BWA.ChartOptions.CenterMainDashboard || {}; 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: { visible: true, connector: { visible: true }, customizeText: function(pointInfo) { return pointInfo.argumentText; } } } ] }; }; });