$(function() { BWA.ChartOptions = BWA.ChartOptions || {}; var C = BWA.ChartOptions.EnthalpyEnergyConsumption = BWA.ChartOptions.EnthalpyEnergyConsumption || {}; var valueAxises = [{ //visible:false, pane: 'topPane', //name: 'Temperature', name: 'enthalpy', position: 'right', //format: 'fixedPoint', precision: 2, //valueMarginsEnabled: true, //minValueMargin: 0, //maxValueMargin: 0, //min: -20, //max: 40, title: { text: '엔탈피' } }, /*{ pane: 'topPane', name: 'humidity', min: 0, max: 100, position: 'right', grid: { visible: true }, label: { visible: true, format: 'largeNumber' }, title: { text: $G('outdoorHumidityWithUnit') }, }*/ ]; var fuelTypeValueAxises = [{ pane: 'topPane', title: { text: $G('electricityConsumptionUsageWithUnit') } }, { pane: 'topPane', title: { text: $G('gasUsageWithUnit') } }, { pane: 'topPane', title: { text: $G('waterUsageWithUnit') } }]; var series = [{ type: 'spline', pane: 'topPane', axis: 'enthalpy', valueField: 'enthalpy', visible: true, // 시리즈만 안보이게 할수 있다. 대신 그렇게 할려면 시작은 false로 해야 한다 hcLee 2015 04 25 point: { size: 8 }, name: '엔탈피', label: { //sible: true } }, /*{ type: 'line', pane: 'topPane', axis: 'humidity', valueField: 'Humidity', point: { size: 8 }, name: $G('outdoorHumidity'), label: { visible: false, customizeText: function () { return this.valueText + ' %'; } } }*/]; var fuelTypeSeries = [{ type: 'bar', pane: 'topPane', valueField: 'Value', name: $G('elec'), label: { horizontalAlignment: 'left', visible: false, customizeText: function () { return this.valueText + 'kWh'; } } }, { type: 'bar', pane: 'topPane', valueField: 'Value', name: $G('gas'), label: { visible: false, customizeText: function () { return this.valueText + 'm3'; } } }, { type: 'bar', pane: 'topPane', valueField: 'Value', name: $G('water'), label: { visible: false, customizeText: function () { return this.valueText + 'm3'; } } }]; //C.getSeriesOptions = function(fuelTypeId, goalUpperBound) { C.getSeriesOptions = function (codeTimeType, fuelTypeId, goalUpperBound) { return { //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType), valueAxis: [$.extend({}, fuelTypeValueAxises[fuelTypeId - 1], { /* constantLines: [{ label: { text: $G('goalUpperBound') }, width: 2, value: goalUpperBound, color: '#ff4500', dashStyle: 'dash' }],*/ showZero: true, })].concat(valueAxises), //series: [fuelTypeSeries[fuelTypeId - 1]].concat(series[0]), series: [fuelTypeSeries[fuelTypeId - 1]].concat(series), }; }; C.getChartOptions = function (codeTimeType, goalUpperBound) { return { legend: { visible: true, verticalAlignment: 'top', horizontalAlignment: 'center' }, //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType), commonSeriesSettings: { argumentField: "DateTime", selectionStyle: { hatching: { direction: "left" } } }, panes: [{ name: 'topPane', border: { visible: false, left: false, right: false, top: false, color: 'gray' } }, ], defaultPane: "topPane", tooltip: { format: 'fixedPoint', precision: 1, enabled: true, shared: true // format: "millions", //customizeText: function() { // return this.argumentText + "
" + this.valueText; //} }, crosshair: { enabled: true, width: 2, horizontalLine: { color: 'blue', dashStyle: 'dash', visible: false }, verticalLine: { color: 'blue', dashStyle: 'dash', visible: true }, label: { visible: true, backgroundColor: "#949494", font: { color: "#fff", size: 12, } } } }; }; });