@bizy/core 20.4.1 → 20.4.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.
@@ -398,6 +398,9 @@ class BizyBarLineChartComponent {
398
398
  }
399
399
  let position = 'right';
400
400
  let offset = 0;
401
+ let max = undefined;
402
+ let min = undefined;
403
+ let interval = undefined;
401
404
  let formatter = null;
402
405
  const xName = _d.xAxi && _d.xAxi.name ? _d.xAxi.name : _d.label;
403
406
  let yName = _d.label;
@@ -411,6 +414,17 @@ class BizyBarLineChartComponent {
411
414
  axisLine.show = false;
412
415
  formatter = null;
413
416
  }
417
+ else {
418
+ if (_d.yAxi.max || _d.yAxi.max === 0) {
419
+ max = _d.yAxi.max;
420
+ }
421
+ if (_d.yAxi.min || _d.yAxi.min === 0) {
422
+ min = _d.yAxi.min;
423
+ }
424
+ if (_d.yAxi.interval || _d.yAxi.interval === 0) {
425
+ interval = _d.yAxi.interval;
426
+ }
427
+ }
414
428
  }
415
429
  if (!_d.yAxi || !_d.yAxi.hide) {
416
430
  if (position === 'right') {
@@ -426,6 +440,9 @@ class BizyBarLineChartComponent {
426
440
  type: 'value',
427
441
  name: _d.yAxi && _d.yAxi.hide ? '' : yName,
428
442
  position,
443
+ min,
444
+ max,
445
+ interval,
429
446
  alignTicks: true,
430
447
  offset,
431
448
  axisLine,
@@ -449,14 +466,37 @@ class BizyBarLineChartComponent {
449
466
  else {
450
467
  this.#chartNames.push(yName);
451
468
  }
452
- series.push({ ...{
453
- type: _d.type,
454
- name: xName,
455
- yAxisIndex,
456
- smooth: !_d.discrete,
457
- stack: _d.stack,
458
- data: _d.values
459
- }, ...color });
469
+ if (_d.barMinHeight) {
470
+ const values = _d.values.map(v => v > 0 ? v : '-'); // use '-' for missing data
471
+ const emptyValues = _d.values.map(v => v === 0 ? 0 : '-');
472
+ series.push({ ...{
473
+ type: _d.type,
474
+ name: xName,
475
+ yAxisIndex,
476
+ smooth: !_d.discrete,
477
+ stack: _d.stack,
478
+ barMinHeight: _d.barMinHeight,
479
+ data: values
480
+ }, ...color });
481
+ series.push({ ...{
482
+ type: _d.type,
483
+ name: '-',
484
+ yAxisIndex,
485
+ smooth: !_d.discrete,
486
+ stack: _d.stack,
487
+ data: emptyValues
488
+ }, ...color });
489
+ }
490
+ else {
491
+ series.push({ ...{
492
+ type: _d.type,
493
+ name: xName,
494
+ yAxisIndex,
495
+ smooth: !_d.discrete,
496
+ stack: _d.stack,
497
+ data: _d.values
498
+ }, ...color });
499
+ }
460
500
  });
461
501
  const tooltip = {
462
502
  show: this.tooltip,
@@ -6309,7 +6349,7 @@ class BizyTableScrollingComponent {
6309
6349
  return;
6310
6350
  }
6311
6351
  let itemSize = 30;
6312
- const rowHeight = getComputedStyle(this.#document.documentElement).getPropertyValue('--bizy-table-row-height');
6352
+ const rowHeight = this.#getClosestCssVariable(this.#elementRef.nativeElement, '--anura-table-row-height');
6313
6353
  const fontSize = getComputedStyle(this.#document.documentElement).getPropertyValue('font-size');
6314
6354
  const gap = Number(fontSize.split('px')[0]) * 0.1;
6315
6355
  if (rowHeight && rowHeight.includes('rem')) {
@@ -6335,6 +6375,17 @@ class BizyTableScrollingComponent {
6335
6375
  }));
6336
6376
  }
6337
6377
  getNativeElement = () => this.#elementRef?.nativeElement;
6378
+ #getClosestCssVariable = (element, cssVariable) => {
6379
+ while (element) {
6380
+ const value = getComputedStyle(element).getPropertyValue(cssVariable).trim();
6381
+ if (value) {
6382
+ return value;
6383
+ }
6384
+ element = element.parentElement;
6385
+ }
6386
+ const rootValue = getComputedStyle(this.#document.documentElement).getPropertyValue(cssVariable).trim();
6387
+ return rootValue || null;
6388
+ };
6338
6389
  ngOnDestroy() {
6339
6390
  this.#subscription.unsubscribe();
6340
6391
  }