@bizy/core 20.10.4 → 20.10.5
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/bizy-core.mjs +24 -8
- package/fesm2022/bizy-core.mjs.map +1 -1
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/styles/variables.css +6 -0
package/fesm2022/bizy-core.mjs
CHANGED
|
@@ -13057,6 +13057,9 @@ const DEFAULT_Y_AXIS = {
|
|
|
13057
13057
|
labels: [],
|
|
13058
13058
|
position: 'left'
|
|
13059
13059
|
};
|
|
13060
|
+
const LINE_DASH_SOLID = [0, 0];
|
|
13061
|
+
const LINE_DASH_DOTTED = [2, 4];
|
|
13062
|
+
const LINE_DASH_DASH = [6, 6];
|
|
13060
13063
|
class BizyHeatMapChartComponent {
|
|
13061
13064
|
#elementRef = inject(ElementRef);
|
|
13062
13065
|
#document = inject(DOCUMENT);
|
|
@@ -13114,8 +13117,10 @@ class BizyHeatMapChartComponent {
|
|
|
13114
13117
|
}];
|
|
13115
13118
|
const xAreaBackgroundColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-x-highlight-area-background-color');
|
|
13116
13119
|
const xAreaBorderColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-x-highlight-area-border-color');
|
|
13120
|
+
const xAreaBorderWidth = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-x-highlight-area-border-width');
|
|
13117
13121
|
const yAreaBackgroundColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-y-highlight-area-background-color');
|
|
13118
13122
|
const yAreaBorderColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-y-highlight-area-border-color');
|
|
13123
|
+
const yAreaBorderWidth = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-y-highlight-area-border-width');
|
|
13119
13124
|
const xAreas = [];
|
|
13120
13125
|
const yAreas = [];
|
|
13121
13126
|
const highlightAreas = this.highlightAreas.data ?? this.highlightAreas;
|
|
@@ -13146,7 +13151,7 @@ class BizyHeatMapChartComponent {
|
|
|
13146
13151
|
style: {
|
|
13147
13152
|
fill: xAreaBackgroundColor,
|
|
13148
13153
|
stroke: xAreaBorderColor,
|
|
13149
|
-
lineWidth:
|
|
13154
|
+
lineWidth: xAreaBorderWidth
|
|
13150
13155
|
},
|
|
13151
13156
|
silent: true,
|
|
13152
13157
|
z2: 100
|
|
@@ -13176,7 +13181,7 @@ class BizyHeatMapChartComponent {
|
|
|
13176
13181
|
style: {
|
|
13177
13182
|
fill: yAreaBackgroundColor,
|
|
13178
13183
|
stroke: yAreaBorderColor,
|
|
13179
|
-
lineWidth:
|
|
13184
|
+
lineWidth: yAreaBorderWidth
|
|
13180
13185
|
},
|
|
13181
13186
|
silent: true,
|
|
13182
13187
|
z2: 100
|
|
@@ -13186,9 +13191,13 @@ class BizyHeatMapChartComponent {
|
|
|
13186
13191
|
zlevel: 5
|
|
13187
13192
|
});
|
|
13188
13193
|
}
|
|
13194
|
+
const xLineWidth = Number(this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-x-highlight-line-width'));
|
|
13189
13195
|
const xLineColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-x-highlight-line-color');
|
|
13196
|
+
const xLineStyle = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-x-highlight-line-style');
|
|
13190
13197
|
const xLineLabelColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-x-highlight-line-label-color');
|
|
13198
|
+
const yLineWidth = Number(this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-y-highlight-line-width'));
|
|
13191
13199
|
const yLineColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-y-highlight-line-color');
|
|
13200
|
+
const yLineStyle = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-y-highlight-line-style');
|
|
13192
13201
|
const yLineLabelColor = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--bizy-heat-map-chart-y-highlight-line-label-color');
|
|
13193
13202
|
const xLines = [];
|
|
13194
13203
|
const yLines = [];
|
|
@@ -13202,6 +13211,7 @@ class BizyHeatMapChartComponent {
|
|
|
13202
13211
|
yLines.push([_line.y]);
|
|
13203
13212
|
}
|
|
13204
13213
|
});
|
|
13214
|
+
const slot = this.highlightLines.slot ?? 'center';
|
|
13205
13215
|
if (xLines.length > 0) {
|
|
13206
13216
|
series.push({
|
|
13207
13217
|
type: 'custom',
|
|
@@ -13209,7 +13219,9 @@ class BizyHeatMapChartComponent {
|
|
|
13209
13219
|
const xValue = api.value(0);
|
|
13210
13220
|
const yStart = params.coordSys.y;
|
|
13211
13221
|
const yEnd = params.coordSys.y + params.coordSys.height;
|
|
13212
|
-
const
|
|
13222
|
+
const cellWidth = Math.abs(api.coord([1, 0])[0] - api.coord([0, 0])[0]);
|
|
13223
|
+
const centerX = api.coord([xValue, 0])[0];
|
|
13224
|
+
const xCoord = slot === 'start' ? centerX - (cellWidth / 2) : slot === 'end' ? centerX + (cellWidth / 2) : centerX;
|
|
13213
13225
|
const children = [{
|
|
13214
13226
|
type: 'line',
|
|
13215
13227
|
shape: {
|
|
@@ -13220,7 +13232,8 @@ class BizyHeatMapChartComponent {
|
|
|
13220
13232
|
},
|
|
13221
13233
|
style: {
|
|
13222
13234
|
stroke: xLineColor,
|
|
13223
|
-
lineWidth:
|
|
13235
|
+
lineWidth: xLineWidth,
|
|
13236
|
+
lineDash: xLineStyle === 'solid' ? LINE_DASH_SOLID : xLineStyle === 'dotted' ? LINE_DASH_DOTTED : xLineStyle === 'dashed' ? LINE_DASH_DASH : LINE_DASH_SOLID
|
|
13224
13237
|
},
|
|
13225
13238
|
z: 100
|
|
13226
13239
|
}];
|
|
@@ -13257,9 +13270,11 @@ class BizyHeatMapChartComponent {
|
|
|
13257
13270
|
type: 'custom',
|
|
13258
13271
|
renderItem: function (params, api) {
|
|
13259
13272
|
const yValue = api.value(0);
|
|
13260
|
-
const yCoord = api.coord([0, yValue])[1];
|
|
13261
13273
|
const xStart = params.coordSys.x;
|
|
13262
13274
|
const xEnd = params.coordSys.x + params.coordSys.width;
|
|
13275
|
+
const cellHeight = Math.abs(api.coord([0, 1])[1] - api.coord([0, 0])[1]);
|
|
13276
|
+
const centerY = api.coord([0, yValue])[1];
|
|
13277
|
+
const yCoord = slot === 'start' ? centerY + (cellHeight / 2) : slot === 'end' ? centerY - (cellHeight / 2) : centerY;
|
|
13263
13278
|
const children = [{
|
|
13264
13279
|
type: 'line',
|
|
13265
13280
|
shape: {
|
|
@@ -13270,7 +13285,8 @@ class BizyHeatMapChartComponent {
|
|
|
13270
13285
|
},
|
|
13271
13286
|
style: {
|
|
13272
13287
|
stroke: yLineColor,
|
|
13273
|
-
lineWidth:
|
|
13288
|
+
lineWidth: yLineWidth,
|
|
13289
|
+
lineDash: yLineStyle === 'solid' ? LINE_DASH_SOLID : yLineStyle === 'dotted' ? LINE_DASH_DOTTED : yLineStyle === 'dashed' ? LINE_DASH_DASH : LINE_DASH_SOLID
|
|
13274
13290
|
},
|
|
13275
13291
|
z: 100
|
|
13276
13292
|
}];
|
|
@@ -13386,7 +13402,7 @@ class BizyHeatMapChartComponent {
|
|
|
13386
13402
|
});
|
|
13387
13403
|
}, 500);
|
|
13388
13404
|
}
|
|
13389
|
-
}
|
|
13405
|
+
},
|
|
13390
13406
|
},
|
|
13391
13407
|
emphasis: {
|
|
13392
13408
|
iconStyle: {
|
|
@@ -13493,7 +13509,7 @@ class BizyHeatMapChartComponent {
|
|
|
13493
13509
|
}
|
|
13494
13510
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.5", ngImport: i0, type: BizyHeatMapChartComponent, decorators: [{
|
|
13495
13511
|
type: Component,
|
|
13496
|
-
args: [{ selector: 'bizy-heat-map-chart', template: '',
|
|
13512
|
+
args: [{ selector: 'bizy-heat-map-chart', template: '', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:flex;justify-content:center}\n"] }]
|
|
13497
13513
|
}], propDecorators: { resizeRef: [{
|
|
13498
13514
|
type: Input
|
|
13499
13515
|
}], tooltip: [{
|