@progress/kendo-charts 2.5.4-dev.202410140828 → 2.6.0-dev.202410171326
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/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/chart/chart.js +39 -0
- package/dist/es2015/chart/chart.js +39 -0
- package/dist/npm/main.js +40 -1
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +1 -1
package/dist/es/chart/chart.js
CHANGED
|
@@ -339,6 +339,7 @@ var Chart = (function (Class) {
|
|
|
339
339
|
this._createPannable();
|
|
340
340
|
this._createZoomSelection();
|
|
341
341
|
this._createMousewheelZoom();
|
|
342
|
+
this._setComputedStyles();
|
|
342
343
|
|
|
343
344
|
this.trigger(RENDER);
|
|
344
345
|
triggerPaneRender(this._plotArea.panes);
|
|
@@ -350,7 +351,16 @@ var Chart = (function (Class) {
|
|
|
350
351
|
this._redrawFocusHighlight();
|
|
351
352
|
};
|
|
352
353
|
|
|
354
|
+
Chart.prototype._setComputedStyles = function _setComputedStyles () {
|
|
355
|
+
var titleHeight = this.titleHeight();
|
|
356
|
+
this.element.style.setProperty('--kendo-chart-computed-title-height', (titleHeight + "px"));
|
|
357
|
+
};
|
|
358
|
+
|
|
353
359
|
Chart.prototype._redrawFocusHighlight = function _redrawFocusHighlight () {
|
|
360
|
+
if (this._destroyed) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
|
|
354
364
|
var ref = this;
|
|
355
365
|
var ref_focusState = ref._focusState;
|
|
356
366
|
var legendInFocus = ref_focusState.legendInFocus;
|
|
@@ -541,9 +551,30 @@ var Chart = (function (Class) {
|
|
|
541
551
|
model.append(plotArea);
|
|
542
552
|
model.reflow();
|
|
543
553
|
|
|
554
|
+
this._setTitleBox(title, subtitle);
|
|
555
|
+
|
|
544
556
|
return model;
|
|
545
557
|
};
|
|
546
558
|
|
|
559
|
+
Chart.prototype._setTitleBox = function _setTitleBox (title, subtitle) {
|
|
560
|
+
if (!title && !subtitle) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
this._titleBox = (title || subtitle).box.clone();
|
|
565
|
+
|
|
566
|
+
var titlePosition = title ? title.options.position : '';
|
|
567
|
+
var subtitlePosition = subtitle ? subtitle.options.position : '';
|
|
568
|
+
var samePosition = titlePosition === subtitlePosition;
|
|
569
|
+
var subtitleAtTop = subtitlePosition !== 'bottom';
|
|
570
|
+
|
|
571
|
+
if (samePosition && subtitle) {
|
|
572
|
+
this._titleBox.wrap(subtitle.box);
|
|
573
|
+
} else if (title && subtitle && subtitleAtTop) {
|
|
574
|
+
this._titleBox = subtitle.box.clone();
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
|
|
547
578
|
Chart.prototype._modelOptions = function _modelOptions () {
|
|
548
579
|
var options = this.options;
|
|
549
580
|
var size = this.getSize();
|
|
@@ -665,6 +696,14 @@ var Chart = (function (Class) {
|
|
|
665
696
|
return isDefaultPrevented;
|
|
666
697
|
};
|
|
667
698
|
|
|
699
|
+
Chart.prototype.titleHeight = function titleHeight () {
|
|
700
|
+
if (!this._titleBox) {
|
|
701
|
+
return 0;
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
return this._titleBox.height();
|
|
705
|
+
};
|
|
706
|
+
|
|
668
707
|
Chart.prototype._attachEvents = function _attachEvents () {
|
|
669
708
|
var obj, obj$1;
|
|
670
709
|
|
|
@@ -330,6 +330,7 @@ class Chart extends Class {
|
|
|
330
330
|
this._createPannable();
|
|
331
331
|
this._createZoomSelection();
|
|
332
332
|
this._createMousewheelZoom();
|
|
333
|
+
this._setComputedStyles();
|
|
333
334
|
|
|
334
335
|
this.trigger(RENDER);
|
|
335
336
|
triggerPaneRender(this._plotArea.panes);
|
|
@@ -341,7 +342,16 @@ class Chart extends Class {
|
|
|
341
342
|
this._redrawFocusHighlight();
|
|
342
343
|
}
|
|
343
344
|
|
|
345
|
+
_setComputedStyles() {
|
|
346
|
+
const titleHeight = this.titleHeight();
|
|
347
|
+
this.element.style.setProperty('--kendo-chart-computed-title-height', `${titleHeight}px`);
|
|
348
|
+
}
|
|
349
|
+
|
|
344
350
|
_redrawFocusHighlight() {
|
|
351
|
+
if (this._destroyed) {
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
|
|
345
355
|
const { _focusState: { legendInFocus, preserveHighlight } } = this;
|
|
346
356
|
|
|
347
357
|
if (legendInFocus && preserveHighlight) {
|
|
@@ -528,9 +538,30 @@ class Chart extends Class {
|
|
|
528
538
|
model.append(plotArea);
|
|
529
539
|
model.reflow();
|
|
530
540
|
|
|
541
|
+
this._setTitleBox(title, subtitle);
|
|
542
|
+
|
|
531
543
|
return model;
|
|
532
544
|
}
|
|
533
545
|
|
|
546
|
+
_setTitleBox(title, subtitle) {
|
|
547
|
+
if (!title && !subtitle) {
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
this._titleBox = (title || subtitle).box.clone();
|
|
552
|
+
|
|
553
|
+
const titlePosition = title ? title.options.position : '';
|
|
554
|
+
const subtitlePosition = subtitle ? subtitle.options.position : '';
|
|
555
|
+
const samePosition = titlePosition === subtitlePosition;
|
|
556
|
+
const subtitleAtTop = subtitlePosition !== 'bottom';
|
|
557
|
+
|
|
558
|
+
if (samePosition && subtitle) {
|
|
559
|
+
this._titleBox.wrap(subtitle.box);
|
|
560
|
+
} else if (title && subtitle && subtitleAtTop) {
|
|
561
|
+
this._titleBox = subtitle.box.clone();
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
|
|
534
565
|
_modelOptions() {
|
|
535
566
|
const options = this.options;
|
|
536
567
|
const size = this.getSize();
|
|
@@ -647,6 +678,14 @@ class Chart extends Class {
|
|
|
647
678
|
return isDefaultPrevented;
|
|
648
679
|
}
|
|
649
680
|
|
|
681
|
+
titleHeight() {
|
|
682
|
+
if (!this._titleBox) {
|
|
683
|
+
return 0;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
return this._titleBox.height();
|
|
687
|
+
}
|
|
688
|
+
|
|
650
689
|
_attachEvents() {
|
|
651
690
|
const element = this.element;
|
|
652
691
|
|