ngx-deebodata 0.0.2 → 0.0.3
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/fesm2022/ngx-deebodata.mjs +6863 -0
- package/fesm2022/ngx-deebodata.mjs.map +1 -0
- package/package.json +35 -16
- package/types/ngx-deebodata.d.ts +439 -0
- package/ng-package.json +0 -7
- package/src/lib/data-table/charts/bar-graph-component/bar-graph-component.css +0 -156
- package/src/lib/data-table/charts/bar-graph-component/bar-graph-component.html +0 -29
- package/src/lib/data-table/charts/bar-graph-component/bar-graph-component.spec.ts +0 -23
- package/src/lib/data-table/charts/bar-graph-component/bar-graph-component.ts +0 -286
- package/src/lib/data-table/charts/charts-and-graphs/charts-and-graphs.css +0 -27
- package/src/lib/data-table/charts/charts-and-graphs/charts-and-graphs.html +0 -53
- package/src/lib/data-table/charts/charts-and-graphs/charts-and-graphs.spec.ts +0 -23
- package/src/lib/data-table/charts/charts-and-graphs/charts-and-graphs.ts +0 -214
- package/src/lib/data-table/charts/column-chart/column-chart.css +0 -19
- package/src/lib/data-table/charts/column-chart/column-chart.html +0 -47
- package/src/lib/data-table/charts/column-chart/column-chart.spec.ts +0 -23
- package/src/lib/data-table/charts/column-chart/column-chart.ts +0 -178
- package/src/lib/data-table/charts/line-graph-component/line-graph-component.css +0 -33
- package/src/lib/data-table/charts/line-graph-component/line-graph-component.html +0 -59
- package/src/lib/data-table/charts/line-graph-component/line-graph-component.spec.ts +0 -23
- package/src/lib/data-table/charts/line-graph-component/line-graph-component.ts +0 -661
- package/src/lib/data-table/charts/num-value-distro-component/num-value-distro-component.css +0 -61
- package/src/lib/data-table/charts/num-value-distro-component/num-value-distro-component.html +0 -27
- package/src/lib/data-table/charts/num-value-distro-component/num-value-distro-component.spec.ts +0 -23
- package/src/lib/data-table/charts/num-value-distro-component/num-value-distro-component.ts +0 -210
- package/src/lib/data-table/charts/pie-graph-component/pie-graph-component.css +0 -0
- package/src/lib/data-table/charts/pie-graph-component/pie-graph-component.html +0 -15
- package/src/lib/data-table/charts/pie-graph-component/pie-graph-component.spec.ts +0 -23
- package/src/lib/data-table/charts/pie-graph-component/pie-graph-component.ts +0 -197
- package/src/lib/data-table/data-table-module/data-cell/data-cell.css +0 -0
- package/src/lib/data-table/data-table-module/data-cell/data-cell.html +0 -6
- package/src/lib/data-table/data-table-module/data-cell/data-cell.spec.ts +0 -23
- package/src/lib/data-table/data-table-module/data-cell/data-cell.ts +0 -271
- package/src/lib/data-table/data-table-module/data-table-header/data-table-header.css +0 -25
- package/src/lib/data-table/data-table-module/data-table-header/data-table-header.html +0 -55
- package/src/lib/data-table/data-table-module/data-table-header/data-table-header.spec.ts +0 -23
- package/src/lib/data-table/data-table-module/data-table-header/data-table-header.ts +0 -261
- package/src/lib/data-table/data-table-module/data-table-paginator/data-table-paginator.css +0 -69
- package/src/lib/data-table/data-table-module/data-table-paginator/data-table-paginator.html +0 -24
- package/src/lib/data-table/data-table-module/data-table-paginator/data-table-paginator.spec.ts +0 -23
- package/src/lib/data-table/data-table-module/data-table-paginator/data-table-paginator.ts +0 -125
- package/src/lib/data-table/data-table-module/export-component/export-component.css +0 -91
- package/src/lib/data-table/data-table-module/export-component/export-component.html +0 -16
- package/src/lib/data-table/data-table-module/export-component/export-component.spec.ts +0 -23
- package/src/lib/data-table/data-table-module/export-component/export-component.ts +0 -206
- package/src/lib/data-table/data-table-module/ngx-deebodata/ngx-deebodata.css +0 -91
- package/src/lib/data-table/data-table-module/ngx-deebodata/ngx-deebodata.html +0 -193
- package/src/lib/data-table/data-table-module/ngx-deebodata/ngx-deebodata.spec.ts +0 -23
- package/src/lib/data-table/data-table-module/ngx-deebodata/ngx-deebodata.ts +0 -2226
- package/src/lib/data-table/data-table-module/row-group-menu/row-group-menu.css +0 -14
- package/src/lib/data-table/data-table-module/row-group-menu/row-group-menu.html +0 -27
- package/src/lib/data-table/data-table-module/row-group-menu/row-group-menu.spec.ts +0 -23
- package/src/lib/data-table/data-table-module/row-group-menu/row-group-menu.ts +0 -58
- package/src/lib/data-table/data-table-module/row-group-panel/row-group-panel.css +0 -23
- package/src/lib/data-table/data-table-module/row-group-panel/row-group-panel.html +0 -48
- package/src/lib/data-table/data-table-module/row-group-panel/row-group-panel.spec.ts +0 -23
- package/src/lib/data-table/data-table-module/row-group-panel/row-group-panel.ts +0 -599
- package/src/lib/data-table/data-table-module/worker.worker.ts +0 -44
- package/src/lib/interfaces/cell-edit.ts +0 -5
- package/src/lib/interfaces/column-header.ts +0 -10
- package/src/lib/interfaces/column-styles.ts +0 -14
- package/src/lib/interfaces/column-symbol.ts +0 -4
- package/src/lib/interfaces/data-cell.ts +0 -14
- package/src/lib/interfaces/data-row.ts +0 -11
- package/src/lib/interfaces/row-number.ts +0 -4
- package/src/lib/services/common-service.spec.ts +0 -16
- package/src/lib/services/common-service.ts +0 -336
- package/src/lib/services/data-table-service.spec.ts +0 -16
- package/src/lib/services/data-table-service.ts +0 -597
- package/src/lib/services/table-drag-service.spec.ts +0 -16
- package/src/lib/services/table-drag-service.ts +0 -347
- package/src/lib/styles.css +0 -1065
- package/src/public-api.ts +0 -8
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
@if(isNumData){
|
|
2
|
-
<div class="half-wid" [id]="'sum' + common.elifyCol(column)">
|
|
3
|
-
<span class="v-mid">Total: </span><span class="lg-text v-mid{{symCls}}" [attr.data-symbol]="symAttr">{{sum}}</span>
|
|
4
|
-
</div><div class="half-wid" [id]="'avg' + common.elifyCol(column)">
|
|
5
|
-
<span class="v-mid">Avg: </span><span class="lg-text v-mid{{symCls}}" [attr.data-symbol]="symAttr">{{avg}}</span>
|
|
6
|
-
</div><div class="half-wid" [id]="'min' + common.elifyCol(column)">
|
|
7
|
-
<span class="v-mid">Min: </span><span class="lg-text v-mid{{symCls}}" [attr.data-symbol]="symAttr">{{min}}</span>
|
|
8
|
-
</div><div class="half-wid" [id]="'max' + common.elifyCol(column)">
|
|
9
|
-
<span class="v-mid">Max: </span><span class="lg-text v-mid{{symCls}}" [attr.data-symbol]="symAttr">{{max}}</span>
|
|
10
|
-
</div>@if(modeHtml){ <div [innerHTML]="modeHtml"></div>}<div>{{tdivHtml}}</div>
|
|
11
|
-
@if(numValDistMsg){ <div class="vdh-loading">{{numValDistMsg}}</div> }
|
|
12
|
-
@if(numLen < numArrMax){
|
|
13
|
-
<app-num-value-distro-component
|
|
14
|
-
[column]="column"
|
|
15
|
-
[average]="numAvg"
|
|
16
|
-
[originalArr]="colData"
|
|
17
|
-
(done)="numValDistMsg = $event"
|
|
18
|
-
[title]="'Building ' + common.sanitizeUi(common.titleCase(column)) + ' value distribution...'"
|
|
19
|
-
></app-num-value-distro-component>
|
|
20
|
-
}
|
|
21
|
-
} @else {
|
|
22
|
-
@if(nonNumUVal){ <div>{{nonNumUVal}}</div> }
|
|
23
|
-
@if(nonNumEVal){ <div>{{nonNumEVal}}</div> }
|
|
24
|
-
@if(modeHtml){ <div [innerHTML]="modeHtml"></div> }
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
@if(pieData){
|
|
28
|
-
<app-pie-graph-component
|
|
29
|
-
[uncoverPie]="dataTableService.removePieCovers"
|
|
30
|
-
[data]="pieData"
|
|
31
|
-
[column]="column"
|
|
32
|
-
></app-pie-graph-component>
|
|
33
|
-
}
|
|
34
|
-
@if(isBarGraph){
|
|
35
|
-
<app-bar-graph-component
|
|
36
|
-
[column]="column"
|
|
37
|
-
[data]="colData"
|
|
38
|
-
(title)="handleBgTitle($event)"
|
|
39
|
-
></app-bar-graph-component>
|
|
40
|
-
}
|
|
41
|
-
@if(isLineGraph){
|
|
42
|
-
<app-line-graph-component
|
|
43
|
-
[column]="column"
|
|
44
|
-
[data]="colData"
|
|
45
|
-
(title)="handleBgTitle($event)"
|
|
46
|
-
></app-line-graph-component>
|
|
47
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { ColumnChart } from './column-chart';
|
|
4
|
-
|
|
5
|
-
describe('ColumnChart', () => {
|
|
6
|
-
let component: ColumnChart;
|
|
7
|
-
let fixture: ComponentFixture<ColumnChart>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [ColumnChart]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(ColumnChart);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
|
-
import { CommonService } from '../../../services/common-service';
|
|
3
|
-
import { DataTableService } from '../../../services/data-table-service';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { NumValueDistroComponent } from '../num-value-distro-component/num-value-distro-component';
|
|
6
|
-
import { PieGraphComponent } from '../pie-graph-component/pie-graph-component';
|
|
7
|
-
import { BarGraphComponent } from '../bar-graph-component/bar-graph-component';
|
|
8
|
-
import { LineGraphComponent } from '../line-graph-component/line-graph-component';
|
|
9
|
-
|
|
10
|
-
@Component({
|
|
11
|
-
selector: 'app-column-chart',
|
|
12
|
-
imports: [ CommonModule, NumValueDistroComponent, PieGraphComponent, BarGraphComponent, LineGraphComponent, ],
|
|
13
|
-
templateUrl: './column-chart.html',
|
|
14
|
-
styleUrls: ['./column-chart.css', '../../../styles.css']
|
|
15
|
-
})
|
|
16
|
-
export class ColumnChart {
|
|
17
|
-
|
|
18
|
-
isNumData = false
|
|
19
|
-
isBoolData = false
|
|
20
|
-
isBarGraph = false
|
|
21
|
-
isLineGraph = false
|
|
22
|
-
counts: any = null
|
|
23
|
-
sum: string = ""
|
|
24
|
-
avg: string = ""
|
|
25
|
-
min: string = ""
|
|
26
|
-
max: string = ""
|
|
27
|
-
numArrMax: number = 5000
|
|
28
|
-
numAvg: number = 0
|
|
29
|
-
modeHtml: string = ""
|
|
30
|
-
tdivHtml: string = ""
|
|
31
|
-
numValDistMsg = ""
|
|
32
|
-
numLen: number = 0
|
|
33
|
-
symCls: string = ""
|
|
34
|
-
symAttr: string = ""
|
|
35
|
-
pieData: any = null
|
|
36
|
-
nonNumUVal: string = ""
|
|
37
|
-
nonNumEVal: string = ""
|
|
38
|
-
@Input() column: string = ""
|
|
39
|
-
@Input() colData: any[] = []
|
|
40
|
-
@Output("bgTitle") bgTitle: EventEmitter<string> = new EventEmitter();
|
|
41
|
-
|
|
42
|
-
constructor(public common: CommonService,
|
|
43
|
-
public dataTableService: DataTableService,){ }
|
|
44
|
-
|
|
45
|
-
ngOnInit() {
|
|
46
|
-
const reg = new RegExp(this.dataTableService.bgSep, "g")
|
|
47
|
-
if(reg.test(this.column)){
|
|
48
|
-
if(this.column.split(this.dataTableService.bgSep).length > 2){
|
|
49
|
-
this.isLineGraph = true
|
|
50
|
-
} else {
|
|
51
|
-
this.isBarGraph = true
|
|
52
|
-
}
|
|
53
|
-
} else {
|
|
54
|
-
this.buildDataInsights()
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
setDistMsg(event: string) {
|
|
59
|
-
this.numValDistMsg = event
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
buildDataInsights() {
|
|
63
|
-
const yearCol = /(year|yr|fy)/g.test(this.column?.toLocaleLowerCase())
|
|
64
|
-
const allNumData = this.colData.every( d => !d || (d && typeof d === "number") )
|
|
65
|
-
const boolData = this.colData.every( d => !d || (d && typeof d === "boolean") )
|
|
66
|
-
this.counts = this.getColumnValueCounts(this.colData)//build pie graphs with this
|
|
67
|
-
let mode = this.getColumnMode(this.counts)
|
|
68
|
-
const disr = (this.counts["n_a"] && this.counts["n_a"] >= mode?.amount) ? " (non-empty value)" : "";
|
|
69
|
-
if(mode && mode.amount != 1){
|
|
70
|
-
try{
|
|
71
|
-
let maxChars = 75
|
|
72
|
-
let pMdTxt = this.common.sanitizeUi(mode.text)
|
|
73
|
-
if(mode.text && typeof mode.text === "string"){
|
|
74
|
-
pMdTxt = mode.text.substring(0, maxChars)
|
|
75
|
-
if(pMdTxt.length === maxChars){
|
|
76
|
-
try{
|
|
77
|
-
pMdTxt = (pMdTxt.trim() + "...")
|
|
78
|
-
if(pMdTxt.startsWith("\""))
|
|
79
|
-
pMdTxt += "\""
|
|
80
|
-
if(pMdTxt.startsWith("'"))
|
|
81
|
-
pMdTxt += "'"
|
|
82
|
-
}catch(e){}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if(pMdTxt && allNumData && !yearCol)
|
|
86
|
-
pMdTxt = parseInt(pMdTxt).toLocaleString(undefined, { maximumFractionDigits: 3 })
|
|
87
|
-
const modeVal = mode.amount.toLocaleString(undefined, { maximumFractionDigits: 0 })
|
|
88
|
-
this.modeHtml = "Most frequent"+disr+": <i>" + pMdTxt + "</i> appears " + modeVal + " time" + (mode.amount === 1 ? "" : "s");
|
|
89
|
-
}catch(e){}
|
|
90
|
-
}
|
|
91
|
-
let bitData;
|
|
92
|
-
if(allNumData)
|
|
93
|
-
bitData = this.colData.every( d => !d || d === 1 || d === 0 )
|
|
94
|
-
if(allNumData && !yearCol && !bitData){//num data
|
|
95
|
-
let isCurr = false
|
|
96
|
-
this.isNumData = true
|
|
97
|
-
const numsOnly = this.colData.filter( d => !!d || (d === 0) )
|
|
98
|
-
this.numLen = numsOnly.length
|
|
99
|
-
let usum = numsOnly.reduce( (acc, curr) => (acc + curr), 0)
|
|
100
|
-
const lastNum = numsOnly[numsOnly.length-1]
|
|
101
|
-
const sym = this.dataTableService.dataFilSrtTracker[this.column]?.colCellSymbol;
|
|
102
|
-
if(sym){
|
|
103
|
-
isCurr = ["$","€","£","¥","₣","₹"].indexOf(sym) > -1
|
|
104
|
-
this.symCls = isCurr ? ' has-symbol-b' : ' has-symbol';
|
|
105
|
-
this.symAttr = sym;
|
|
106
|
-
}
|
|
107
|
-
if(typeof lastNum === "number" && ((usum - lastNum === lastNum) || (Math.abs(usum - lastNum*2) < 0.02))){//check that a total column is already there
|
|
108
|
-
usum -= lastNum
|
|
109
|
-
this.numLen -= 1
|
|
110
|
-
this.tdivHtml = "We omitted the last value from the total because it may be a total row itself.";
|
|
111
|
-
}
|
|
112
|
-
this.numAvg = (usum/this.numLen)
|
|
113
|
-
this.sum = usum.toLocaleString(undefined, { maximumFractionDigits: 2, minimumFractionDigits: (isCurr ? 2 : 0) });
|
|
114
|
-
this.avg = this.numAvg.toLocaleString(undefined, { maximumFractionDigits: 2, minimumFractionDigits: (isCurr ? 2 : 0) });
|
|
115
|
-
this.min = Math.min(...numsOnly).toLocaleString(undefined, { maximumFractionDigits: 2, minimumFractionDigits: (isCurr ? 2 : 0) });
|
|
116
|
-
this.max = Math.max(...(this.tdivHtml ? numsOnly.filter( (n, ind) => ind < (numsOnly.length-1) ) : numsOnly)).
|
|
117
|
-
toLocaleString(undefined, { maximumFractionDigits: 2, minimumFractionDigits: (isCurr ? 2 : 0) });
|
|
118
|
-
if(this.numLen && this.numLen < this.numArrMax)
|
|
119
|
-
this.numValDistMsg = "Building " + this.common.sanitizeUi(this.common.titleCase(this.column)) + " value distribution..."
|
|
120
|
-
} else {
|
|
121
|
-
const dSet =new Set(this.colData)
|
|
122
|
-
let arrFrmSet: any[] = []
|
|
123
|
-
dSet.forEach( (v) => { arrFrmSet.push(v) })
|
|
124
|
-
this.nonNumUVal = arrFrmSet.length.toLocaleString(undefined, { maximumFractionDigits: 0 }) + " unique value" + (dSet.size === 1 ? "" : "s")
|
|
125
|
-
const empVals = this.colData.filter( (d) => !d).length
|
|
126
|
-
this.nonNumEVal = empVals.toLocaleString(undefined, { maximumFractionDigits: 0 }) + " empty value" + (empVals === 1 ? "" : "s");
|
|
127
|
-
const cantDoDD = arrFrmSet.some( a => a && a.length > 40 )
|
|
128
|
-
if(!cantDoDD && ((boolData || bitData) || (arrFrmSet.filter( (a) => !!a ).length > 0 && this.colData.every( (d) => !d || typeof d === "string")))){
|
|
129
|
-
if(arrFrmSet.length <= 18)
|
|
130
|
-
this.pieData = { counts: this.counts, type: ((boolData || bitData) ? "boolean" : "string") }
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
getColumnValueCounts(data: any[]) {
|
|
136
|
-
let i = 0
|
|
137
|
-
let count: any = {}
|
|
138
|
-
const na = "n_a"
|
|
139
|
-
const len = data.length
|
|
140
|
-
for(i; i < len; i++){
|
|
141
|
-
const d = data[i]
|
|
142
|
-
const val = (d && typeof d) === "string" ? d :
|
|
143
|
-
(this.common.isADateObject(d) ? d.toLocaleDateString() : d)
|
|
144
|
-
if(!val || typeof val === "undefined" || this.dataTableService.badStrings.indexOf(val) > -1){
|
|
145
|
-
if(!count[na] || typeof count[na] === "undefined")
|
|
146
|
-
count[na] = 1
|
|
147
|
-
else
|
|
148
|
-
count[na] += 1
|
|
149
|
-
continue
|
|
150
|
-
}
|
|
151
|
-
if(!count[val] || typeof count[val] === "undefined")
|
|
152
|
-
count[val] = 1
|
|
153
|
-
else
|
|
154
|
-
count[val] += 1
|
|
155
|
-
}
|
|
156
|
-
count[this.dataTableService.deboTotal] = len
|
|
157
|
-
return count;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
getColumnMode(count: any) {
|
|
161
|
-
let most = null
|
|
162
|
-
const na = "n_a"
|
|
163
|
-
for(const prop in count){
|
|
164
|
-
if(prop === this.dataTableService.deboTotal || prop === na)
|
|
165
|
-
continue
|
|
166
|
-
if(!most)
|
|
167
|
-
most = {text: prop, amount: count[prop]}
|
|
168
|
-
if(count[prop] > most.amount)
|
|
169
|
-
most = {text: prop, amount: count[prop]}
|
|
170
|
-
}
|
|
171
|
-
return most
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
handleBgTitle(event: string) {
|
|
175
|
-
this.bgTitle.emit(event)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
:host{
|
|
2
|
-
--accent-color:rgb(50, 50, 50);
|
|
3
|
-
--grid-color:rgb(199, 199, 199);
|
|
4
|
-
--pad-left-base: 33px;
|
|
5
|
-
--row-num-width: 75px;
|
|
6
|
-
--reg-font-size: 17px
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.lg-plot-opq{
|
|
10
|
-
opacity: 0;
|
|
11
|
-
background: white;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.lg-plot-opq:hover{
|
|
15
|
-
opacity: 1 !important;
|
|
16
|
-
background: var(--grid-color);
|
|
17
|
-
transition: opacity 0.2s ease;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.lg-canvas{
|
|
21
|
-
top: 0;
|
|
22
|
-
left: 0;
|
|
23
|
-
bottom: 0;
|
|
24
|
-
position: absolute;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.lg-msg{
|
|
28
|
-
top: 0;
|
|
29
|
-
left: 0;
|
|
30
|
-
right: 0;
|
|
31
|
-
position: absolute;
|
|
32
|
-
color: var(--accent-color);
|
|
33
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<div #statOptsCont class="center stat-opt-contain">
|
|
2
|
-
@for(stat of statOpts; track stat){
|
|
3
|
-
<div [style.width]="statBtnWid" class="inline-b center">
|
|
4
|
-
<button class="no-btn stat-opt-btn" (click)="handleStatChange(stat)"
|
|
5
|
-
[class.stat-opt-btn-active]="selStat === stat">{{common.titleCase(stat)}}</button>
|
|
6
|
-
</div>
|
|
7
|
-
}
|
|
8
|
-
</div>
|
|
9
|
-
<div #auxOptsCont style="padding-bottom: 17px;">
|
|
10
|
-
<div class="qtr-wid center v-mid">
|
|
11
|
-
@if(valOpts().length){
|
|
12
|
-
<select [name]="'valSel' + common.elifyCol(column)" [id]="'valSel' + common.elifyCol(column)" [(ngModel)]="selDdVal"
|
|
13
|
-
(change)="handleValSelChange($any($event).target.value)" style="max-width: 80%">
|
|
14
|
-
@for(o of valOpts(); track o){
|
|
15
|
-
<option [value]="o" [selected]="o === selDdVal">{{o}}</option>
|
|
16
|
-
}
|
|
17
|
-
</select>
|
|
18
|
-
}
|
|
19
|
-
</div><div class="qtr-wid center v-mid">
|
|
20
|
-
<select [name]="'timeDiff' + common.elifyCol(column)" [id]="'timeDiff' + common.elifyCol(column)"
|
|
21
|
-
(change)="handleTimeDiffChange($any($event).target.value)" style="max-width: 88%" [(ngModel)]="selTDOpt">
|
|
22
|
-
<option value="-1" [selected]="selTDOpt === -1">All time</option>
|
|
23
|
-
@for(t of timeDiffOpts; track t.val){
|
|
24
|
-
<option [value]="t.val" [selected]="t.val === selTDOpt">{{t.text}}</option>
|
|
25
|
-
}
|
|
26
|
-
</select>
|
|
27
|
-
</div><div class="half-wid v-mid center dontwrap {{currentDeltaCls}}" [innerHTML]="currentDelta"></div>
|
|
28
|
-
</div>
|
|
29
|
-
<div #lgContain [id]="'lineGraph' + common.elifyCol(column)" class="inner-bg-contain" style="margin-bottom: 33px;">
|
|
30
|
-
<div #yAxis class="lg-n-marker-cont" [style.height]="totalHgt + 'px'">
|
|
31
|
-
@for(n of naddedtks(); track n.value; let i = $index){
|
|
32
|
-
<div class="bg-dep-var" [class.invisible]="n.value && n.value === maxYVal" [attr.data-number]="n.value"
|
|
33
|
-
[style.padding-bottom]="i < 4 ? (((i*4)+1) + 'px') : '0px'">
|
|
34
|
-
{{(n.value === '0') ? '' : n.value}}
|
|
35
|
-
</div>
|
|
36
|
-
}
|
|
37
|
-
@for(n of nmrks; track n){
|
|
38
|
-
<div class="lg-n-marker-h">{{n.value}}</div>
|
|
39
|
-
}
|
|
40
|
-
</div><div #lineGraph class="line-graph" [style.height]="totalHgt + 'px'">
|
|
41
|
-
@for(n of dtmrks; track n){
|
|
42
|
-
<div class="lg-dt-marker" [class.visible-marker]="n.visible" [style.left]="n.left">{{n.value}}</div>
|
|
43
|
-
}
|
|
44
|
-
@for(n of dtmrksH; track n){
|
|
45
|
-
<div class="lg-dt-marker-h" [class.visible-marker]="n.visible" [style.left]="n.left">{{n.value}}</div>
|
|
46
|
-
}
|
|
47
|
-
@if(lblTxt){
|
|
48
|
-
<div class="lg-lbl-x">{{lblTxt}}</div>
|
|
49
|
-
}
|
|
50
|
-
<canvas #lgCanvas class="lg-canvas" [height]="totalHgt"></canvas>
|
|
51
|
-
@for(p of plots(); track $index){
|
|
52
|
-
<div class="lg-plot lg-plot-opq" [attr.data-number]="p.number" (mouseenter)="showDotPlotInfo(p.date, p.number)"
|
|
53
|
-
(mouseleave)="hideDotPlotInfo()" [ngStyle]="{'bottom': (p.bottom-4) + 'px', 'left': (p.left-4) + 'px' }">{{p.value}}</div>
|
|
54
|
-
}
|
|
55
|
-
@if(!plots().length){
|
|
56
|
-
<div class="flex-center lg-msg" [style.height]="totalHgt + 'px'"><div>{{graphMsg}}</div></div>
|
|
57
|
-
}
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { LineGraphComponent } from './line-graph-component';
|
|
4
|
-
|
|
5
|
-
describe('LineGraphComponent', () => {
|
|
6
|
-
let component: LineGraphComponent;
|
|
7
|
-
let fixture: ComponentFixture<LineGraphComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(async () => {
|
|
10
|
-
await TestBed.configureTestingModule({
|
|
11
|
-
imports: [LineGraphComponent]
|
|
12
|
-
})
|
|
13
|
-
.compileComponents();
|
|
14
|
-
|
|
15
|
-
fixture = TestBed.createComponent(LineGraphComponent);
|
|
16
|
-
component = fixture.componentInstance;
|
|
17
|
-
fixture.detectChanges();
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
it('should create', () => {
|
|
21
|
-
expect(component).toBeTruthy();
|
|
22
|
-
});
|
|
23
|
-
});
|