$(function() {
    BWA.ChartOptions = BWA.ChartOptions || {};
    BWA.ChartOptions.WaterUAnalysis = BWA.ChartOptions.WaterUAnalysis || {};
    BWA.ChartOptions.WaterUAnalysis.getChartEffiOptions = function (codeTimeType) {
        return {
            palette: "Bright",
            legend: {
                visible: true,
                verticalAlignment: 'top',
                horizontalAlignment: 'center'
            },

            //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType),
            commonSeriesSettings: {
                argumentField: "DateTime",
                selectionStyle: {
                    hatching: {
                        direction: "left"
                    }
                }
            },
            argumentAxis:
            {
                argumentType: 'DateTime',
                label: {
                    alignment: 'center',
                    format: 'dd일 HH시'
                },
                tickInterval: { hours: 1 },
            },
            valueAxis: [
            {
                name: 'sw', // 
                //position: 'right',
                label: {
                    //font: { color: '#c96374' },
                    visible: true,
                },

                title: {
                    
                    text: '사용량 (m3)'
                }
            },
            {
                name: 'lev', // 
                tickInterval: 10,
                valueMarginsEnabled: true,
                minValueMargin: 0,
                maxValueMargin: 0,
                //argumentType: 'numeric',
                min: 0,
                max: 100,
                position: 'right',
                label: {
                    visible: true,
                },

                title: {
                    text: '수위 (%)'
                }
            }

/*            {
                name: 'sw', // 
                position: 'right',
                label: {
                    visible: true,
                },

                title: {
                    text: '시수   (m3/h)'
                }
            }*/
            ],

            series: [
/*            {
                axis: 'rw',
                type: 'line',
                name: '우수',
                argumentField: "DateTime",
                valueField: 'rw', // 
                label: {
                    visible: false,
                },
                point: { size: 8  },
            },*/
            {
                axis: 'lev',
                name: '저수조 수위',
                type: 'bar',
                valueField: 'lev',
                point: { size: 4, symbol: 'triangle' },
                label: {
                    visible: false,
                }
            },

            {
            axis: 'sw',
            name: '시수 사용량',
            type: 'spline',
            color: 'red',
            valueField: 'sw',
            //point: { size: 8, symbol: 'triangle' },
            point: { size: 8 },
            label: {
                visible: false,
            }
        }],
            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,
                    }
                }
            }

        };
    };


});