Compare commits

...

4 Commits

  1. 28
      src/components/statistics/StatisticsSearch.js
  2. 63
      src/modules/statistics/models/index.ts

28
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 (

63
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: []

Loading…
Cancel
Save