$(function() { BWA.ChartOptions = BWA.ChartOptions || {}; BWA.ChartOptions.FacilityRuntime = BWA.ChartOptions.FacilityRuntime || {}; BWA.ChartOptions.FacilityRuntime.getChartDayOptions = 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" } } }, valueAxis: [ { name: 'runtime', // //position: 'right', label: { //font: { color: '#c96374' }, visible: true, }, title: { text: '가동시간 (분)' } }, { name: 'cost', // position: 'right', label: { //font: { color: '#c96374' }, visible: true, }, title: { text: '비용 (원)' } } ], series: [ { axis: 'runtime', type: 'bar', name: '가동시간', argumentField: "DateTime", valueField: 'rt', // label: { visible: false, }, point: { size: 8 }, }, { axis: 'cost', type: 'spline', name: '비용', argumentField: "DateTime", valueField: 'cost', // label: { visible: false, }, point: { size: 8 }, }, ], tooltip: { enabled: true, }, }; }; BWA.ChartOptions.FacilityRuntime.getChartMonthOptions = function (codeTimeType, handlePointClick) { /* var argumentAxis; switch (codeTimeType) { case $Code.TimeType.DAY: argumentAxis = { label: { customizeText: function () { return this.value + '일'; } }, //min: moment().startOf('month').date(), //max: moment().endOf('month').date(), //valueMarginsEnabled: false, tickInterval: 5, //minValueMargin: 0.0, //maxValueMargin: 0.02, }; break; case $Code.TimeType.MONTH: argumentAxis = { label: { customizeText: function () { return this.value + '월'; } }, //min: 1, //max: 12, //valueMarginsEnabled: false, //tickInterval: 1, //minValueMargin: 0.0, //maxValueMargin: 0.02, }; break; } argumentAxis.argumentType = 'string';*/ return { palette: "Palette", pointClick: handlePointClick, legend: { visible: true, verticalAlignment: 'top', horizontalAlignment: 'center' }, //argumentAxis: BWA.Chart.getTimeLineArgumentAxis(null, codeTimeType), //argumentAxis: argumentAxis, commonSeriesSettings: { argumentField: "DateTime", selectionStyle: { hatching: { direction: "left" } } }, valueAxis: [ { name: 'runtime', // //position: 'right', label: { //font: { color: '#c96374' }, visible: true, }, title: { text: '가동시간 (분)' } }, { name: 'cost', // position: 'right', label: { //font: { color: '#c96374' }, visible: true, }, title: { text: '비용 (원)' } } ], series: [ { axis: 'runtime', type: 'bar', name: '가동시간', argumentField: "DateTime", valueField: 'rt', // label: { visible: false, }, point: { size: 8 }, }, { axis: 'cost', type: 'spline', name: '비용', argumentField: "DateTime", valueField: 'cost', // label: { visible: false, }, point: { size: 8 }, }, ], tooltip: { enabled: true, }, }; }; });