@dssp/dkpi 1.0.0-alpha.49 → 1.0.0-alpha.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/components/kpi-single-boxplot-chart.d.ts +24 -0
- package/dist-client/components/kpi-single-boxplot-chart.js +317 -0
- package/dist-client/components/kpi-single-boxplot-chart.js.map +1 -0
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.d.ts +5 -4
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js +94 -120
- package/dist-client/pages/project-complete-tabs/pc-tab1-plan.js.map +1 -1
- package/dist-client/pages/project-complete-tabs/{pc-tab3-rating.d.ts → pc-tab2-rating.d.ts} +2 -2
- package/dist-client/pages/project-complete-tabs/{pc-tab3-rating.js → pc-tab2-rating.js} +15 -16
- package/dist-client/pages/project-complete-tabs/pc-tab2-rating.js.map +1 -0
- package/dist-client/pages/project-complete-tabs/{pc-tab4-upload.d.ts → pc-tab3-upload.d.ts} +2 -3
- package/dist-client/pages/project-complete-tabs/{pc-tab4-upload.js → pc-tab3-upload.js} +17 -21
- package/dist-client/pages/project-complete-tabs/pc-tab3-upload.js.map +1 -0
- package/dist-client/pages/sv-project-complete.d.ts +4 -8
- package/dist-client/pages/sv-project-complete.js +29 -123
- package/dist-client/pages/sv-project-complete.js.map +1 -1
- package/dist-client/pages/sv-project-completed-list.d.ts +1 -0
- package/dist-client/pages/sv-project-completed-list.js +18 -4
- package/dist-client/pages/sv-project-completed-list.js.map +1 -1
- package/dist-client/pages/sv-project-detail.js +1 -1
- package/dist-client/pages/sv-project-detail.js.map +1 -1
- package/dist-client/pages/sv-project-list.d.ts +3 -0
- package/dist-client/pages/sv-project-list.js +52 -3
- package/dist-client/pages/sv-project-list.js.map +1 -1
- package/dist-client/shared/complete-api.d.ts +5 -3
- package/dist-client/shared/complete-api.js +57 -16
- package/dist-client/shared/complete-api.js.map +1 -1
- package/dist-client/themes/light.css +2 -2
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/viewparts/menu-tools.js +1 -2
- package/dist-client/viewparts/menu-tools.js.map +1 -1
- package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js +8 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js.map +1 -1
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js +1 -1
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/schema.graphql +4 -35
- package/dist-client/pages/project-complete-tabs/pc-tab2-final.d.ts +0 -11
- package/dist-client/pages/project-complete-tabs/pc-tab2-final.js +0 -277
- package/dist-client/pages/project-complete-tabs/pc-tab2-final.js.map +0 -1
- package/dist-client/pages/project-complete-tabs/pc-tab3-rating.js.map +0 -1
- package/dist-client/pages/project-complete-tabs/pc-tab4-upload.js.map +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class KpiSingleBoxplotChart extends LitElement {
|
|
3
|
+
data: any;
|
|
4
|
+
minKey: string;
|
|
5
|
+
maxKey: string;
|
|
6
|
+
meanKey: string;
|
|
7
|
+
medianKey: string;
|
|
8
|
+
q1Key: string;
|
|
9
|
+
q3Key: string;
|
|
10
|
+
valueKey: string;
|
|
11
|
+
color: string;
|
|
12
|
+
vertical: boolean;
|
|
13
|
+
static styles: import("lit").CSSResult;
|
|
14
|
+
private chartWidth;
|
|
15
|
+
private chartHeight;
|
|
16
|
+
private resizeObserver?;
|
|
17
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
updated(): void;
|
|
21
|
+
private drawSingleBoxplot;
|
|
22
|
+
private drawVerticalBoxplot;
|
|
23
|
+
private drawHorizontalBoxplot;
|
|
24
|
+
}
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import { LitElement, html, css } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import * as d3 from 'd3';
|
|
5
|
+
let KpiSingleBoxplotChart = class KpiSingleBoxplotChart extends LitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.data = {};
|
|
9
|
+
this.minKey = 'min';
|
|
10
|
+
this.maxKey = 'max';
|
|
11
|
+
this.meanKey = 'mean';
|
|
12
|
+
this.medianKey = 'median';
|
|
13
|
+
this.q1Key = 'q1';
|
|
14
|
+
this.q3Key = 'q3';
|
|
15
|
+
this.valueKey = 'value';
|
|
16
|
+
this.color = '#2196f3';
|
|
17
|
+
this.vertical = true; // true: 세로형, false: 가로형
|
|
18
|
+
this.chartWidth = 0;
|
|
19
|
+
this.chartHeight = 0;
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return html `
|
|
23
|
+
<svg
|
|
24
|
+
id="single-boxplot"
|
|
25
|
+
width=${this.chartWidth}
|
|
26
|
+
height=${this.chartHeight}
|
|
27
|
+
viewBox="0 0 ${this.chartWidth} ${this.chartHeight}"
|
|
28
|
+
preserveAspectRatio="xMidYMid meet"
|
|
29
|
+
></svg>
|
|
30
|
+
`;
|
|
31
|
+
}
|
|
32
|
+
connectedCallback() {
|
|
33
|
+
super.connectedCallback();
|
|
34
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
35
|
+
for (const entry of entries) {
|
|
36
|
+
const rect = entry.contentRect;
|
|
37
|
+
this.chartWidth = rect.width;
|
|
38
|
+
this.chartHeight = rect.height;
|
|
39
|
+
this.requestUpdate();
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
this.resizeObserver.observe(this);
|
|
43
|
+
}
|
|
44
|
+
disconnectedCallback() {
|
|
45
|
+
var _a;
|
|
46
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
47
|
+
super.disconnectedCallback();
|
|
48
|
+
}
|
|
49
|
+
updated() {
|
|
50
|
+
this.drawSingleBoxplot();
|
|
51
|
+
}
|
|
52
|
+
drawSingleBoxplot() {
|
|
53
|
+
const svg = d3.select(this.renderRoot.querySelector('#single-boxplot'));
|
|
54
|
+
svg.selectAll('*').remove();
|
|
55
|
+
// 데이터 검증
|
|
56
|
+
if (!this.data || Object.keys(this.data).length === 0) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const w = this.chartWidth || 200;
|
|
60
|
+
const h = this.chartHeight || 200;
|
|
61
|
+
const margin = 20;
|
|
62
|
+
const plotW = w - margin * 2;
|
|
63
|
+
const plotH = h - margin * 2;
|
|
64
|
+
// 필수 필드 검증
|
|
65
|
+
const requiredFields = [this.minKey, this.maxKey, this.q1Key, this.q3Key, this.medianKey, this.meanKey];
|
|
66
|
+
const missingFields = requiredFields.filter(field => this.data[field] == null);
|
|
67
|
+
if (missingFields.length > 0) {
|
|
68
|
+
console.warn('Missing required fields:', missingFields);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
const values = [
|
|
72
|
+
this.data[this.minKey],
|
|
73
|
+
this.data[this.maxKey],
|
|
74
|
+
this.data[this.q1Key],
|
|
75
|
+
this.data[this.q3Key],
|
|
76
|
+
this.data[this.medianKey],
|
|
77
|
+
this.data[this.meanKey]
|
|
78
|
+
];
|
|
79
|
+
if (this.data[this.valueKey] != null) {
|
|
80
|
+
values.push(this.data[this.valueKey]);
|
|
81
|
+
}
|
|
82
|
+
const g = svg
|
|
83
|
+
.attr('width', w)
|
|
84
|
+
.attr('height', h)
|
|
85
|
+
.append('g')
|
|
86
|
+
.attr('transform', `translate(${margin}, ${margin})`);
|
|
87
|
+
if (this.vertical) {
|
|
88
|
+
// 세로형 boxplot (기본)
|
|
89
|
+
this.drawVerticalBoxplot(g, plotW, plotH, values);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
// 가로형 boxplot
|
|
93
|
+
this.drawHorizontalBoxplot(g, plotW, plotH, values);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
drawVerticalBoxplot(g, plotW, plotH, values) {
|
|
97
|
+
var _a, _b;
|
|
98
|
+
const y = d3
|
|
99
|
+
.scaleLinear()
|
|
100
|
+
.domain([(_a = d3.min(values)) !== null && _a !== void 0 ? _a : 0, (_b = d3.max(values)) !== null && _b !== void 0 ? _b : 1])
|
|
101
|
+
.nice()
|
|
102
|
+
.range([plotH, 0]);
|
|
103
|
+
const boxWidth = Math.min(plotW * 0.6, 60); // 박스 너비 제한
|
|
104
|
+
const boxX = (plotW - boxWidth) / 2; // 중앙 정렬
|
|
105
|
+
// Outlier 계산
|
|
106
|
+
const iqr = this.data[this.q3Key] - this.data[this.q1Key];
|
|
107
|
+
const lowerFence = this.data[this.q1Key] - 1.5 * iqr;
|
|
108
|
+
const upperFence = this.data[this.q3Key] + 1.5 * iqr;
|
|
109
|
+
const actualMin = Math.max(this.data[this.minKey], lowerFence);
|
|
110
|
+
const actualMax = Math.min(this.data[this.maxKey], upperFence);
|
|
111
|
+
// 박스
|
|
112
|
+
g.append('rect')
|
|
113
|
+
.attr('x', boxX)
|
|
114
|
+
.attr('y', y(Math.max(this.data[this.q1Key], this.data[this.q3Key])))
|
|
115
|
+
.attr('width', boxWidth)
|
|
116
|
+
.attr('height', Math.abs(y(this.data[this.q1Key]) - y(this.data[this.q3Key])))
|
|
117
|
+
.attr('fill', this.color)
|
|
118
|
+
.attr('opacity', 0.6)
|
|
119
|
+
.attr('stroke', '#333')
|
|
120
|
+
.attr('stroke-width', 1);
|
|
121
|
+
// 중앙선(중앙값)
|
|
122
|
+
g.append('line')
|
|
123
|
+
.attr('x1', boxX)
|
|
124
|
+
.attr('x2', boxX + boxWidth)
|
|
125
|
+
.attr('y1', y(this.data[this.medianKey]))
|
|
126
|
+
.attr('y2', y(this.data[this.medianKey]))
|
|
127
|
+
.attr('stroke', '#333')
|
|
128
|
+
.attr('stroke-width', 2);
|
|
129
|
+
// 수염
|
|
130
|
+
const centerX = boxX + boxWidth / 2;
|
|
131
|
+
g.append('line')
|
|
132
|
+
.attr('x1', centerX)
|
|
133
|
+
.attr('x2', centerX)
|
|
134
|
+
.attr('y1', y(actualMin))
|
|
135
|
+
.attr('y2', y(actualMax))
|
|
136
|
+
.attr('stroke', '#333')
|
|
137
|
+
.attr('stroke-width', 1);
|
|
138
|
+
// min/max 선
|
|
139
|
+
const capWidth = boxWidth / 3;
|
|
140
|
+
g.append('line')
|
|
141
|
+
.attr('x1', centerX - capWidth / 2)
|
|
142
|
+
.attr('x2', centerX + capWidth / 2)
|
|
143
|
+
.attr('y1', y(actualMin))
|
|
144
|
+
.attr('y2', y(actualMin))
|
|
145
|
+
.attr('stroke', '#333')
|
|
146
|
+
.attr('stroke-width', 1);
|
|
147
|
+
g.append('line')
|
|
148
|
+
.attr('x1', centerX - capWidth / 2)
|
|
149
|
+
.attr('x2', centerX + capWidth / 2)
|
|
150
|
+
.attr('y1', y(actualMax))
|
|
151
|
+
.attr('y2', y(actualMax))
|
|
152
|
+
.attr('stroke', '#333')
|
|
153
|
+
.attr('stroke-width', 1);
|
|
154
|
+
// Outliers
|
|
155
|
+
if (this.data[this.minKey] < lowerFence) {
|
|
156
|
+
g.append('circle')
|
|
157
|
+
.attr('cx', centerX)
|
|
158
|
+
.attr('cy', y(this.data[this.minKey]))
|
|
159
|
+
.attr('r', 4.5)
|
|
160
|
+
.attr('fill', '#ff4444');
|
|
161
|
+
}
|
|
162
|
+
if (this.data[this.maxKey] > upperFence) {
|
|
163
|
+
g.append('circle')
|
|
164
|
+
.attr('cx', centerX)
|
|
165
|
+
.attr('cy', y(this.data[this.maxKey]))
|
|
166
|
+
.attr('r', 4.5)
|
|
167
|
+
.attr('fill', '#ff4444');
|
|
168
|
+
}
|
|
169
|
+
// 현재값 (있는 경우)
|
|
170
|
+
if (this.data[this.valueKey] != null) {
|
|
171
|
+
g.append('circle')
|
|
172
|
+
.attr('cx', centerX)
|
|
173
|
+
.attr('cy', y(this.data[this.valueKey]))
|
|
174
|
+
.attr('r', 3)
|
|
175
|
+
.attr('fill', '#ff4444');
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
drawHorizontalBoxplot(g, plotW, plotH, values) {
|
|
179
|
+
var _a, _b;
|
|
180
|
+
const x = d3
|
|
181
|
+
.scaleLinear()
|
|
182
|
+
.domain([(_a = d3.min(values)) !== null && _a !== void 0 ? _a : 0, (_b = d3.max(values)) !== null && _b !== void 0 ? _b : 1])
|
|
183
|
+
.nice()
|
|
184
|
+
.range([0, plotW]);
|
|
185
|
+
const boxHeight = Math.min(plotH * 0.6, 60);
|
|
186
|
+
const boxY = (plotH - boxHeight) / 2;
|
|
187
|
+
// Outlier 계산
|
|
188
|
+
const iqr = this.data[this.q3Key] - this.data[this.q1Key];
|
|
189
|
+
const lowerFence = this.data[this.q1Key] - 1.5 * iqr;
|
|
190
|
+
const upperFence = this.data[this.q3Key] + 1.5 * iqr;
|
|
191
|
+
const actualMin = Math.max(this.data[this.minKey], lowerFence);
|
|
192
|
+
const actualMax = Math.min(this.data[this.maxKey], upperFence);
|
|
193
|
+
// 박스 (가로)
|
|
194
|
+
g.append('rect')
|
|
195
|
+
.attr('x', x(Math.min(this.data[this.q1Key], this.data[this.q3Key])))
|
|
196
|
+
.attr('y', boxY)
|
|
197
|
+
.attr('width', Math.abs(x(this.data[this.q3Key]) - x(this.data[this.q1Key])))
|
|
198
|
+
.attr('height', boxHeight)
|
|
199
|
+
.attr('fill', this.color)
|
|
200
|
+
.attr('opacity', 0.6)
|
|
201
|
+
.attr('stroke', '#333')
|
|
202
|
+
.attr('stroke-width', 1);
|
|
203
|
+
// 중앙선 (가로)
|
|
204
|
+
g.append('line')
|
|
205
|
+
.attr('x1', x(this.data[this.medianKey]))
|
|
206
|
+
.attr('x2', x(this.data[this.medianKey]))
|
|
207
|
+
.attr('y1', boxY)
|
|
208
|
+
.attr('y2', boxY + boxHeight)
|
|
209
|
+
.attr('stroke', '#333')
|
|
210
|
+
.attr('stroke-width', 2);
|
|
211
|
+
// 수염 (가로)
|
|
212
|
+
const centerY = boxY + boxHeight / 2;
|
|
213
|
+
g.append('line')
|
|
214
|
+
.attr('x1', x(actualMin))
|
|
215
|
+
.attr('x2', x(actualMax))
|
|
216
|
+
.attr('y1', centerY)
|
|
217
|
+
.attr('y2', centerY)
|
|
218
|
+
.attr('stroke', '#333')
|
|
219
|
+
.attr('stroke-width', 1);
|
|
220
|
+
// min/max 선 (가로)
|
|
221
|
+
const capHeight = boxHeight / 3;
|
|
222
|
+
g.append('line')
|
|
223
|
+
.attr('x1', x(actualMin))
|
|
224
|
+
.attr('x2', x(actualMin))
|
|
225
|
+
.attr('y1', centerY - capHeight / 2)
|
|
226
|
+
.attr('y2', centerY + capHeight / 2)
|
|
227
|
+
.attr('stroke', '#333')
|
|
228
|
+
.attr('stroke-width', 1);
|
|
229
|
+
g.append('line')
|
|
230
|
+
.attr('x1', x(actualMax))
|
|
231
|
+
.attr('x2', x(actualMax))
|
|
232
|
+
.attr('y1', centerY - capHeight / 2)
|
|
233
|
+
.attr('y2', centerY + capHeight / 2)
|
|
234
|
+
.attr('stroke', '#333')
|
|
235
|
+
.attr('stroke-width', 1);
|
|
236
|
+
// Outliers (가로)
|
|
237
|
+
if (this.data[this.minKey] < lowerFence) {
|
|
238
|
+
g.append('circle')
|
|
239
|
+
.attr('cx', x(this.data[this.minKey]))
|
|
240
|
+
.attr('cy', centerY)
|
|
241
|
+
.attr('r', 4.5)
|
|
242
|
+
.attr('fill', '#ff4444');
|
|
243
|
+
}
|
|
244
|
+
if (this.data[this.maxKey] > upperFence) {
|
|
245
|
+
g.append('circle')
|
|
246
|
+
.attr('cx', x(this.data[this.maxKey]))
|
|
247
|
+
.attr('cy', centerY)
|
|
248
|
+
.attr('r', 4.5)
|
|
249
|
+
.attr('fill', '#ff4444');
|
|
250
|
+
}
|
|
251
|
+
// 현재값 (가로)
|
|
252
|
+
if (this.data[this.valueKey] != null) {
|
|
253
|
+
g.append('circle')
|
|
254
|
+
.attr('cx', x(this.data[this.valueKey]))
|
|
255
|
+
.attr('cy', centerY)
|
|
256
|
+
.attr('r', 3)
|
|
257
|
+
.attr('fill', '#ff4444');
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
};
|
|
261
|
+
KpiSingleBoxplotChart.styles = css `
|
|
262
|
+
:host {
|
|
263
|
+
display: block;
|
|
264
|
+
width: 100%;
|
|
265
|
+
height: 100%;
|
|
266
|
+
}
|
|
267
|
+
svg {
|
|
268
|
+
width: 100%;
|
|
269
|
+
height: 100%;
|
|
270
|
+
display: block;
|
|
271
|
+
}
|
|
272
|
+
`;
|
|
273
|
+
__decorate([
|
|
274
|
+
property({ type: Object }),
|
|
275
|
+
__metadata("design:type", Object)
|
|
276
|
+
], KpiSingleBoxplotChart.prototype, "data", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
property({ type: String }),
|
|
279
|
+
__metadata("design:type", String)
|
|
280
|
+
], KpiSingleBoxplotChart.prototype, "minKey", void 0);
|
|
281
|
+
__decorate([
|
|
282
|
+
property({ type: String }),
|
|
283
|
+
__metadata("design:type", String)
|
|
284
|
+
], KpiSingleBoxplotChart.prototype, "maxKey", void 0);
|
|
285
|
+
__decorate([
|
|
286
|
+
property({ type: String }),
|
|
287
|
+
__metadata("design:type", String)
|
|
288
|
+
], KpiSingleBoxplotChart.prototype, "meanKey", void 0);
|
|
289
|
+
__decorate([
|
|
290
|
+
property({ type: String }),
|
|
291
|
+
__metadata("design:type", String)
|
|
292
|
+
], KpiSingleBoxplotChart.prototype, "medianKey", void 0);
|
|
293
|
+
__decorate([
|
|
294
|
+
property({ type: String }),
|
|
295
|
+
__metadata("design:type", String)
|
|
296
|
+
], KpiSingleBoxplotChart.prototype, "q1Key", void 0);
|
|
297
|
+
__decorate([
|
|
298
|
+
property({ type: String }),
|
|
299
|
+
__metadata("design:type", String)
|
|
300
|
+
], KpiSingleBoxplotChart.prototype, "q3Key", void 0);
|
|
301
|
+
__decorate([
|
|
302
|
+
property({ type: String }),
|
|
303
|
+
__metadata("design:type", String)
|
|
304
|
+
], KpiSingleBoxplotChart.prototype, "valueKey", void 0);
|
|
305
|
+
__decorate([
|
|
306
|
+
property({ type: String }),
|
|
307
|
+
__metadata("design:type", String)
|
|
308
|
+
], KpiSingleBoxplotChart.prototype, "color", void 0);
|
|
309
|
+
__decorate([
|
|
310
|
+
property({ type: Boolean }),
|
|
311
|
+
__metadata("design:type", Boolean)
|
|
312
|
+
], KpiSingleBoxplotChart.prototype, "vertical", void 0);
|
|
313
|
+
KpiSingleBoxplotChart = __decorate([
|
|
314
|
+
customElement('kpi-single-boxplot-chart')
|
|
315
|
+
], KpiSingleBoxplotChart);
|
|
316
|
+
export { KpiSingleBoxplotChart };
|
|
317
|
+
//# sourceMappingURL=kpi-single-boxplot-chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kpi-single-boxplot-chart.js","sourceRoot":"","sources":["../../client/components/kpi-single-boxplot-chart.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AAGjB,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAU;IAA9C;;QACuB,SAAI,GAAQ,EAAE,CAAA;QACd,WAAM,GAAW,KAAK,CAAA;QACtB,WAAM,GAAW,KAAK,CAAA;QACtB,YAAO,GAAW,MAAM,CAAA;QACxB,cAAS,GAAW,QAAQ,CAAA;QAC5B,UAAK,GAAW,IAAI,CAAA;QACpB,UAAK,GAAW,IAAI,CAAA;QACpB,aAAQ,GAAW,OAAO,CAAA;QAC1B,UAAK,GAAW,SAAS,CAAA;QACxB,aAAQ,GAAY,IAAI,CAAA,CAAC,wBAAwB;QAetE,eAAU,G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AG,EAAE,CAAC,CAAC;iBACZ,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;QAC5B,CAAC;IACH,CAAC;;AAhSM,4BAAM,GAAG,GAAG,CAAA;;;;;;;;;;;GAWlB,AAXY,CAWZ;AAtB2B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;mDAAe;AACd;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;qDAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;sDAAyB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;wDAA6B;AAC5B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAAqB;AACpB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;uDAA2B;AAC1B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;oDAA0B;AACxB;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;;uDAAyB;AAV1C,qBAAqB;IADjC,aAAa,CAAC,0BAA0B,CAAC;GAC7B,qBAAqB,CA6SjC","sourcesContent":["import { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport * as d3 from 'd3'\n\n@customElement('kpi-single-boxplot-chart')\nexport class KpiSingleBoxplotChart extends LitElement {\n @property({ type: Object }) data: any = {}\n @property({ type: String }) minKey: string = 'min'\n @property({ type: String }) maxKey: string = 'max'\n @property({ type: String }) meanKey: string = 'mean'\n @property({ type: String }) medianKey: string = 'median'\n @property({ type: String }) q1Key: string = 'q1'\n @property({ type: String }) q3Key: string = 'q3'\n @property({ type: String }) valueKey: string = 'value'\n @property({ type: String }) color: string = '#2196f3'\n @property({ type: Boolean }) vertical: boolean = true // true: 세로형, false: 가로형\n\n static styles = css`\n :host {\n display: block;\n width: 100%;\n height: 100%;\n }\n svg {\n width: 100%;\n height: 100%;\n display: block;\n }\n `\n\n private chartWidth = 0\n private chartHeight = 0\n private resizeObserver?: ResizeObserver\n\n render() {\n return html`\n <svg\n id=\"single-boxplot\"\n width=${this.chartWidth}\n height=${this.chartHeight}\n viewBox=\"0 0 ${this.chartWidth} ${this.chartHeight}\"\n preserveAspectRatio=\"xMidYMid meet\"\n ></svg>\n `\n }\n\n connectedCallback() {\n super.connectedCallback()\n this.resizeObserver = new ResizeObserver(entries => {\n for (const entry of entries) {\n const rect = entry.contentRect\n this.chartWidth = rect.width\n this.chartHeight = rect.height\n this.requestUpdate()\n }\n })\n this.resizeObserver.observe(this)\n }\n\n disconnectedCallback() {\n this.resizeObserver?.disconnect()\n super.disconnectedCallback()\n }\n\n updated() {\n this.drawSingleBoxplot()\n }\n\n private drawSingleBoxplot() {\n const svg = d3.select(this.renderRoot.querySelector('#single-boxplot'))\n svg.selectAll('*').remove()\n\n // 데이터 검증\n if (!this.data || Object.keys(this.data).length === 0) {\n return\n }\n\n const w = this.chartWidth || 200\n const h = this.chartHeight || 200\n const margin = 20\n const plotW = w - margin * 2\n const plotH = h - margin * 2\n\n // 필수 필드 검증\n const requiredFields = [this.minKey, this.maxKey, this.q1Key, this.q3Key, this.medianKey, this.meanKey]\n const missingFields = requiredFields.filter(field => this.data[field] == null)\n if (missingFields.length > 0) {\n console.warn('Missing required fields:', missingFields)\n return\n }\n\n const values = [\n this.data[this.minKey],\n this.data[this.maxKey],\n this.data[this.q1Key],\n this.data[this.q3Key],\n this.data[this.medianKey],\n this.data[this.meanKey]\n ]\n\n if (this.data[this.valueKey] != null) {\n values.push(this.data[this.valueKey])\n }\n\n const g = svg\n .attr('width', w)\n .attr('height', h)\n .append('g')\n .attr('transform', `translate(${margin}, ${margin})`)\n\n if (this.vertical) {\n // 세로형 boxplot (기본)\n this.drawVerticalBoxplot(g, plotW, plotH, values)\n } else {\n // 가로형 boxplot\n this.drawHorizontalBoxplot(g, plotW, plotH, values)\n }\n }\n\n private drawVerticalBoxplot(g: any, plotW: number, plotH: number, values: number[]) {\n const y = d3\n .scaleLinear()\n .domain([d3.min(values) ?? 0, d3.max(values) ?? 1])\n .nice()\n .range([plotH, 0])\n\n const boxWidth = Math.min(plotW * 0.6, 60) // 박스 너비 제한\n const boxX = (plotW - boxWidth) / 2 // 중앙 정렬\n\n // Outlier 계산\n const iqr = this.data[this.q3Key] - this.data[this.q1Key]\n const lowerFence = this.data[this.q1Key] - 1.5 * iqr\n const upperFence = this.data[this.q3Key] + 1.5 * iqr\n\n const actualMin = Math.max(this.data[this.minKey], lowerFence)\n const actualMax = Math.min(this.data[this.maxKey], upperFence)\n\n // 박스\n g.append('rect')\n .attr('x', boxX)\n .attr('y', y(Math.max(this.data[this.q1Key], this.data[this.q3Key])))\n .attr('width', boxWidth)\n .attr('height', Math.abs(y(this.data[this.q1Key]) - y(this.data[this.q3Key])))\n .attr('fill', this.color)\n .attr('opacity', 0.6)\n .attr('stroke', '#333')\n .attr('stroke-width', 1)\n\n // 중앙선(중앙값)\n g.append('line')\n .attr('x1', boxX)\n .attr('x2', boxX + boxWidth)\n .attr('y1', y(this.data[this.medianKey]))\n .attr('y2', y(this.data[this.medianKey]))\n .attr('stroke', '#333')\n .attr('stroke-width', 2)\n\n // 수염\n const centerX = boxX + boxWidth / 2\n g.append('line')\n .attr('x1', centerX)\n .attr('x2', centerX)\n .attr('y1', y(actualMin))\n .attr('y2', y(actualMax))\n .attr('stroke', '#333')\n .attr('stroke-width', 1)\n\n // min/max 선\n const capWidth = boxWidth / 3\n g.append('line')\n .attr('x1', centerX - capWidth / 2)\n .attr('x2', centerX + capWidth / 2)\n .attr('y1', y(actualMin))\n .attr('y2', y(actualMin))\n .attr('stroke', '#333')\n .attr('stroke-width', 1)\n\n g.append('line')\n .attr('x1', centerX - capWidth / 2)\n .attr('x2', centerX + capWidth / 2)\n .attr('y1', y(actualMax))\n .attr('y2', y(actualMax))\n .attr('stroke', '#333')\n .attr('stroke-width', 1)\n\n // Outliers\n if (this.data[this.minKey] < lowerFence) {\n g.append('circle')\n .attr('cx', centerX)\n .attr('cy', y(this.data[this.minKey]))\n .attr('r', 4.5)\n .attr('fill', '#ff4444')\n }\n\n if (this.data[this.maxKey] > upperFence) {\n g.append('circle')\n .attr('cx', centerX)\n .attr('cy', y(this.data[this.maxKey]))\n .attr('r', 4.5)\n .attr('fill', '#ff4444')\n }\n\n\n // 현재값 (있는 경우)\n if (this.data[this.valueKey] != null) {\n g.append('circle')\n .attr('cx', centerX)\n .attr('cy', y(this.data[this.valueKey]))\n .attr('r', 3)\n .attr('fill', '#ff4444')\n }\n }\n\n private drawHorizontalBoxplot(g: any, plotW: number, plotH: number, values: number[]) {\n const x = d3\n .scaleLinear()\n .domain([d3.min(values) ?? 0, d3.max(values) ?? 1])\n .nice()\n .range([0, plotW])\n\n const boxHeight = Math.min(plotH * 0.6, 60)\n const boxY = (plotH - boxHeight) / 2\n\n // Outlier 계산\n const iqr = this.data[this.q3Key] - this.data[this.q1Key]\n const lowerFence = this.data[this.q1Key] - 1.5 * iqr\n const upperFence = this.data[this.q3Key] + 1.5 * iqr\n\n const actualMin = Math.max(this.data[this.minKey], lowerFence)\n const actualMax = Math.min(this.data[this.maxKey], upperFence)\n\n // 박스 (가로)\n g.append('rect')\n .attr('x', x(Math.min(this.data[this.q1Key], this.data[this.q3Key])))\n .attr('y', boxY)\n .attr('width', Math.abs(x(this.data[this.q3Key]) - x(this.data[this.q1Key])))\n .attr('height', boxHeight)\n .attr('fill', this.color)\n .attr('opacity', 0.6)\n .attr('stroke', '#333')\n .attr('stroke-width', 1)\n\n // 중앙선 (가로)\n g.append('line')\n .attr('x1', x(this.data[this.medianKey]))\n .attr('x2', x(this.data[this.medianKey]))\n .attr('y1', boxY)\n .attr('y2', boxY + boxHeight)\n .attr('stroke', '#333')\n .attr('stroke-width', 2)\n\n // 수염 (가로)\n const centerY = boxY + boxHeight / 2\n g.append('line')\n .attr('x1', x(actualMin))\n .attr('x2', x(actualMax))\n .attr('y1', centerY)\n .attr('y2', centerY)\n .attr('stroke', '#333')\n .attr('stroke-width', 1)\n\n // min/max 선 (가로)\n const capHeight = boxHeight / 3\n g.append('line')\n .attr('x1', x(actualMin))\n .attr('x2', x(actualMin))\n .attr('y1', centerY - capHeight / 2)\n .attr('y2', centerY + capHeight / 2)\n .attr('stroke', '#333')\n .attr('stroke-width', 1)\n\n g.append('line')\n .attr('x1', x(actualMax))\n .attr('x2', x(actualMax))\n .attr('y1', centerY - capHeight / 2)\n .attr('y2', centerY + capHeight / 2)\n .attr('stroke', '#333')\n .attr('stroke-width', 1)\n\n // Outliers (가로)\n if (this.data[this.minKey] < lowerFence) {\n g.append('circle')\n .attr('cx', x(this.data[this.minKey]))\n .attr('cy', centerY)\n .attr('r', 4.5)\n .attr('fill', '#ff4444')\n }\n\n if (this.data[this.maxKey] > upperFence) {\n g.append('circle')\n .attr('cx', x(this.data[this.maxKey]))\n .attr('cy', centerY)\n .attr('r', 4.5)\n .attr('fill', '#ff4444')\n }\n\n\n // 현재값 (가로)\n if (this.data[this.valueKey] != null) {\n g.append('circle')\n .attr('cx', x(this.data[this.valueKey]))\n .attr('cy', centerY)\n .attr('r', 3)\n .attr('fill', '#ff4444')\n }\n }\n}"]}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
2
|
export declare class SvProjectCompleteTab1Plan extends LitElement {
|
|
3
3
|
static styles: import("lit").CSSResult[];
|
|
4
|
-
|
|
4
|
+
kpiMetricValues: any;
|
|
5
|
+
kpiMetrics: any;
|
|
5
6
|
project: any;
|
|
6
7
|
render(): import("lit-html").TemplateResult<1>;
|
|
8
|
+
willUpdate(changedProperties: Map<string, any>): void;
|
|
9
|
+
private _getInitData;
|
|
7
10
|
private _onInputChange;
|
|
8
|
-
private
|
|
9
|
-
private _getDisplay;
|
|
10
|
-
private _saveAndMove;
|
|
11
|
+
private _save;
|
|
11
12
|
private _reset;
|
|
12
13
|
}
|