| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560 | $(function() {    BWA.ChartOptions = BWA.ChartOptions || {};    BWA.ChartOptions.WaterCoolingAnalysis = BWA.ChartOptions.WaterCoolingAnalysis || {};    var valueAxises = [{        name: 'in_temp',        position: 'right',        //valueMarginsEnabled: true,        //minValueMargin: 0,        //maxValueMargin: 0,        label: {            font: { color: '#c96374' },            visible: true,            //format: 'largeNumber'        },        title: {            text: '코일 입/출구 온도'        }    }    /*, {        name: 'out_temp',        //min: 0,        //max: 100,        position: 'right',        grid: {            visible: true        },        label: {            font: { color: '#00A7C6' },            visible: true,            //format: 'largeNumber'        },        title: {            text: '온수코일 출구온도'        }    }*/]; // 4개의 온도값은 하나온도의 축으로 통일 2015 06 15    var seriesSHot = [{        type: 'spline',        color: '#c96374',        axis: 'in_temp',        valueField: 'in_temp',        point: { size: 2 },        name: '온수코일 입구온도',        label: {            visible: false,            font: { color: '#c96374', },            customizeText: function () {                return this.valueText + ' °C';            }        }    }, {        type: 'spline',        axis: 'in_temp',        color: '#00A7C6',        valueField: 'out_temp',        point: { size: 2 },        name: '온수코일 출구온도',        label: {            font: { color: '#00A7C6', },            visible: false,            customizeText: function () {                return this.valueText + ' °C';            }        }    }];    var seriesSCold = [{        type: 'spline',        color: '#c963FF',        axis: 'in_temp',        valueField: 'cold_in_temp',        point: { size: 2 },        name: '냉수코일 입구온도',        label: {            visible: false,            font: { color: '#c963FF', },            customizeText: function () {                return this.valueText + ' °C';            }        }    }, {        type: 'spline',        axis: 'in_temp',        color: '#00A7FF',        valueField: 'cold_out_temp',        point: { size: 2 },        name: '냉수코일 출구온도',        label: {            font: { color: '#00A7FF', },            visible: false,            customizeText: function () {                return this.valueText + ' °C';            }        }    }];    BWA.ChartOptions.WaterCoolingAnalysis.getChartCalorieCOptions = function(codeTimeType) {        return {            palette: "Bright",            legend: {                visible: true,                verticalAlignment: 'top',                horizontalAlignment: 'center'            },            //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),            // ㅎㅎ 이게 있어야 멀티드로잉이 된다. 2015 04 21            commonSeriesSettings: {                argumentField: "DateTime",                selectionStyle: {                    hatching: {                        direction: "left"                    }                }            },            valueAxis: [{                name: 'water',                position: 'left',                title: {                    text: $G('WaterUnit')                }            }].concat(valueAxises),            series: [{                axis: 'water',                type: 'bar',                name: '냉수유량',                argumentField: "DateTime",                valueField: 'CV', //                 label: {                    visible: false,                },                point: { size: 8 }            }].concat(seriesSCold),            tooltip: {                enabled: true,            },            crosshair: {                enabled: true,                width: 2,                horizontalLine: {                    color: 'red',                    dashStyle: 'dash',                    visible: false                },                verticalLine: {                    color: 'black',                    dashStyle: 'dash',                    visible: true                },                label: {                    visible: true,                    backgroundColor: "#949494",                    font: {                        color: "#fff",                        size: 12,                    }                }            }        };    };    BWA.ChartOptions.WaterCoolingAnalysis.getChartCalorieHOptions = function (codeTimeType) {        return {            palette: "Harmony Light",            legend: {                visible: true,                verticalAlignment: 'top',                horizontalAlignment: 'center'            },            //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),            // ㅎㅎ 이게 있어야 멀티드로잉이 된다. 2015 04 21            commonSeriesSettings: {                argumentField: "DateTime",                selectionStyle: {                    hatching: {                        direction: "left"                    }                }            },            valueAxis: [{                name: 'water',                position: 'left',                title: {                    text: $G('WaterUnit')                }            }].concat(valueAxises),            series: [{                axis: 'water',                type: 'bar',                name: '온수유량',                argumentField: "DateTime",                valueField: 'HV', // 냉수                label: {                    visible: false,                },                point: { size: 8 }            }, ].concat(seriesSHot),            tooltip: {                enabled: true,            },            crosshair: {                enabled: true,                width: 2,                horizontalLine: {                    color: 'red',                    dashStyle: 'dash',                    visible: false                },                verticalLine: {                    color: 'black',                    dashStyle: 'dash',                    visible: true                },                label: {                    visible: true,                    backgroundColor: "#949494",                    font: {                        color: "#fff",                        size: 12,                    }                }            }        };    };    var valueAxise_1 = {        name: 'AFw',        position: 'right',        label: {            visible: true,        },        title: {            text: '냉방 ATF'        }    }    var series_1 = {        type: 'spline',        color: '#c96374',        axis: 'AFw',        valueField: 'afw',        point: { size: 4 },        name: '냉방 ATF',        label: {            visible: false,            //font: { color: '#c96374', },            customizeText: function () {                return '냉방 ATF';            }        }    }    BWA.ChartOptions.WaterCoolingAnalysis.getChart_1_Options = function (codeTimeType) {        return {            palette: "Bright",            legend: {                visible: true,                verticalAlignment: 'top',                horizontalAlignment: 'center'            },            commonSeriesSettings: {                argumentField: "DateTime",                selectionStyle: {                    hatching: {                        direction: "left"                    }                }            },            valueAxis: [{                title: {                    text: '냉수열량 (kcal)'                }            }].concat(valueAxise_1),            series: [{                type: 'bar',                valueField: 'kcal',                argumentField: 'DateTime',                name: '냉수열량',                label: {                    visible: false,                    //customizeText: function() {                    //    return this.argumentField + this.valueText;                    //}                },                point: { size: 8 }            }].concat(series_1),            tooltip: {                enabled: true,                format: 'fixedPoint',                precision: 2,            },            crosshair: {                enabled: true,                width: 2,                horizontalLine: {                    color: 'red',                    dashStyle: 'dash',                    visible: false                },                verticalLine: {                    color: 'black',                    dashStyle: 'dash',                    visible: true                },                label: {                    visible: true,                    backgroundColor: "#949494",                    font: {                        color: "#fff",                        size: 12,                    }                }            }        };    };    var valueAxise_2 = {        name: 'AFw',        position: 'right',        label: {            visible: true,        },        title: {            text: '난방 ATF'        }    }    var series_2 = {        type: 'spline',        color: '#c96374',        axis: 'AFw',        valueField: 'afw',        point: { size: 4 },        name: '난방 ATF',        label: {            visible: false,            //font: { color: '#c96374', },            customizeText: function () {                return '난방 ATF';            }        }    }    BWA.ChartOptions.WaterCoolingAnalysis.getChart_2_Options = function (codeTimeType) {        return {            palette: "Default",            legend: {                visible: true,                verticalAlignment: 'top',                horizontalAlignment: 'center'            },            commonSeriesSettings: {                argumentField: "DateTime",                selectionStyle: {                    hatching: {                        direction: "left"                    }                }            },            valueAxis: [{                title: {                    text: '온수열량 (kcal)'                }            }].concat(valueAxise_2),            series: [{                type: 'bar',                valueField: 'kcal',                argumentField: 'DateTime',                name: '온수열량',                label: {                    visible: false,                    //customizeText: function() {                    //    return this.argumentField + this.valueText;                    //}                },                point: { size: 8 }            }].concat(series_2),            tooltip: {                enabled: true,            },            crosshair: {                enabled: true,                width: 2,                horizontalLine: {                    color: 'red',                    dashStyle: 'dash',                    visible: false                },                verticalLine: {                    color: 'black',                    dashStyle: 'dash',                    visible: true                },                label: {                    visible: true,                    backgroundColor: "#949494",                    font: {                        color: "#fff",                        size: 12,                    }                }            }        };    };    BWA.ChartOptions.WaterCoolingAnalysis.getChart_3_Options = function (codeTimeType) {        return {            palette: "Bright",            legend: {                visible: true,                verticalAlignment: 'top',                horizontalAlignment: 'center'            },            commonSeriesSettings: {                argumentField: "DateTime",                selectionStyle: {                    hatching: {                        direction: "left"                    }                }            },            valueAxis: [            {                title: {                    text: '소비전력량 (kWh)'                }            },            {                name: 'hz',                position: 'right',                label: {                    visible: true,                },                title: {                    text: '주파수 (Hz)'                }            }            ],            series: [            {                type: 'bar',                valueField: 'inkw',                argumentField: 'DateTime',                name: '급기팬 소비전력',                label: {                    visible: false,                    //customizeText: function() {                    //    return this.argumentField + this.valueText;                    //}                },                point: { size: 4 }            },            {                type: 'bar',                valueField: 'outkw',                argumentField: 'DateTime',                name: '환기팬 소비전력',                label: {                    visible: false,                    //customizeText: function() {                    //    return this.argumentField + this.valueText;                    //}                },                point: { size: 4 }            },            {                type: 'spline',                axis: 'hz',                valueField: 'inhz',                argumentField: 'DateTime',                name: '급기팬 주파수',                label: {                    visible: false,                    //customizeText: function() {                    //    return this.argumentField + this.valueText;                    //}                },                point: { size: 4 }            },            {                type: 'spline',                axis: 'hz',                valueField: 'outhz',                argumentField: 'DateTime',                name: '환기팬 주파수',                label: {                    visible: false,                    //customizeText: function() {                    //    return this.argumentField + this.valueText;                    //}                },                point: { size: 4 }            },            ],            tooltip: {                enabled: true,            },            crosshair: {                enabled: true,                width: 2,                horizontalLine: {                    color: 'red',                    dashStyle: 'dash',                    visible: false                },                verticalLine: {                    color: 'black',                    dashStyle: 'dash',                    visible: true                },                label: {                    visible: true,                    backgroundColor: "#949494",                    font: {                        color: "#fff",                        size: 12,                    }                }            }        };    };});
 |