From 043ed86178090a85f96e90efc890b91b0fc81d15 Mon Sep 17 00:00:00 2001 From: hhjk00 Date: Wed, 15 Nov 2023 14:34:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?plugins=20console=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/statistics/StatisticsSearch.js | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/components/statistics/StatisticsSearch.js b/src/components/statistics/StatisticsSearch.js index 0059d54..2c675e7 100644 --- a/src/components/statistics/StatisticsSearch.js +++ b/src/components/statistics/StatisticsSearch.js @@ -155,22 +155,24 @@ export default function StatisticsSearch({ }; const handlerPlugins = chartData => { - return { - afterDraw: function (chart) { - if (chartData.datasets[0].data.length <= 0) { - let ctx = chart.chart.ctx; - let width = chart.chart.width; - let height = chart.chart.height; + return [ + { + afterDraw: function (chart) { + if (chartData.datasets[0].data.length <= 0) { + let ctx = chart.chart.ctx; + let width = chart.chart.width; + let height = chart.chart.height; - chart.clear(); - ctx.save(); - ctx.textAlign = 'center'; - ctx.textBaseline = 'middle'; - ctx.fillText('표시할 데이터가 없습니다.', width / 2, height / 2); - ctx.restore(); + chart.clear(); + ctx.save(); + ctx.textAlign = 'center'; + ctx.textBaseline = 'middle'; + ctx.fillText('표시할 데이터가 없습니다.', width / 2, height / 2); + ctx.restore(); + } } } - }; + ]; }; return ( From 35a2e61d73929532c120ba13965cda77ebcd52cd Mon Sep 17 00:00:00 2001 From: hhjk00 Date: Wed, 15 Nov 2023 16:21:04 +0900 Subject: [PATCH 2/2] =?UTF-8?q?initialState=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/statistics/models/index.ts | 63 ++++++++++++++++++++++++-- 1 file changed, 60 insertions(+), 3 deletions(-) diff --git a/src/modules/statistics/models/index.ts b/src/modules/statistics/models/index.ts index 81fd219..df266da 100644 --- a/src/modules/statistics/models/index.ts +++ b/src/modules/statistics/models/index.ts @@ -30,17 +30,74 @@ export interface IStcsSearchRq { } export const initialState = { - flight: [], + flight: [ + { + name: '-', + year: '0', + month: '0', + day: '0' + }, + { + name: '-', + year: '0', + month: '0', + day: '0' + }, + { + name: '-', + year: '0', + month: '0', + day: '0' + } + ], flightSearch: { graphData: [], topData: [] }, - abnormal: [], + abnormal: [ + { + name: '-', + year: '0', + month: '0', + day: '0' + }, + { + name: '-', + year: '0', + month: '0', + day: '0' + }, + { + name: '-', + year: '0', + month: '0', + day: '0' + } + ], abnormalSearch: { graphData: [], topData: [] }, - result: [], + result: [ + { + name: '-', + year: '0', + month: '0', + day: '0' + }, + { + name: '-', + year: '0', + month: '0', + day: '0' + }, + { + name: '-', + year: '0', + month: '0', + day: '0' + } + ], resultSearch: { graphData: [], topData: []