$(function() { "use strict"; BWA.ChartOptions = BWA.ChartOptions || {}; var A = BWA.ChartOptions.CenterMainDashboard = BWA.ChartOptions.CenterMainDashboard || {}; A.getMonthEnergyUsageStatusSeriesOptions = function (flags) { var series = []; if (flags.thisMonth) { series.push({ valueField: 'ThisMonthValue', name: ' 이번달', point: { size: 8 } }); } if (flags.lastMonth) { series.push({ valueField: 'LastMonthValue', name: '지난달', point: { size: 8 } }); } if (flags.lastYear) { series.push({ valueField: 'LastYearValue', name: '작년', point: { size: 8 } }); } return series; }; A.getMainChartOptions = function () { return { palette: 'Pastel', commonSeriesSettings: { //type: 'spline', argumentField: 'DateTime' }, series: [ { type: 'spline', valueField: 'eValue', name: '전력', axis: '전력', }, { type: 'spline', valueField: 'gValue', name: '가스', axis: '가스', }, ], argumentAxis: { label: { customizeText: function() { return this.value; } }, /*min: 1, max: 31, valueMarginsEnabled: false, tickInterval: 5,*/ }, valueAxis: [{ name: '전력', position: 'left', /*type: 'continuous', valueType: 'numeric', tickInterval: 10, valueMarginsEnabled: true, minValueMargin: 0, maxValueMargin: 0, min: -10, max: 40,*/ label: { font: { color: '#BB7862' }, visible: true, //format: 'largeNumber' }, title: { text: '전력 (kWh)' } }, { //pane: 'topPane', name: '가스', /*tickInterval: 20, valueMarginsEnabled: true, minValueMargin: 0, maxValueMargin: 0, //argumentType: 'numeric', min: 0, max: 100,*/ position: 'right', label: { font: { color: '#70B3A1' }, visible: true, //format: 'largeNumber' }, title: { text: '가스 (m3)' } }], tooltip: { enabled: true, customizeTooltip: function(point) { return { text: '[{0}] {1}{2}: {3}'.formati(point.seriesName, point.argumentText, '', point.value) }; } }, legend: { visible: false, // position: 'inside', verticalAlignment: "top", horizontalAlignment: "right", border: { visible: true } } }; }; A.getMonthEnergyUsageStatusChartOptions = function () { return { palette: 'Pastel', commonSeriesSettings: { type: 'line', argumentField: 'DateTime' }, series: [ { valueField: 'Value', name: '' }, ], argumentAxis: { label: { customizeText: function() { return this.value + '일'; } }, min: 1, max: 31, valueMarginsEnabled: false, tickInterval: 5, }, valueAxis: { label: { format: 'largeNumber' }, showZero: true }, tooltip: { enabled: true, customizeTooltip: function(point) { return { text: '[{0}] {1}{2}: {3}'.formati(point.seriesName, point.argumentText, '일', point.value) }; } }, legend: { visible: false, // position: 'inside', verticalAlignment: "top", horizontalAlignment: "right", border: { visible: true } } }; }; });