@@ -12,7 +12,7 @@ const version_id = 'dev',
12
12
13
13
/** @summary version date
14
14
* @desc Release date in format day/month/year like '14/04/2022' */
15
- version_date = '18 /09/2025',
15
+ version_date = '22 /09/2025',
16
16
17
17
/** @summary version id and date
18
18
* @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -1567,7 +1567,8 @@ function createHistogram(typename, nbinsx, nbinsy, nbinsz) {
1567
1567
* @desc Title may include axes titles, provided with ';' symbol like "Title;x;y;z" */
1568
1568
1569
1569
function setHistogramTitle(histo, title) {
1570
- if (!histo) return;
1570
+ if (!histo || !isStr(title))
1571
+ return;
1571
1572
if (title.indexOf(';') < 0)
1572
1573
histo.fTitle = title;
1573
1574
else {
@@ -102976,6 +102977,24 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
102976
102977
/** @summary Return histogram object used for axis drawings */
102977
102978
getHistogram() { return this.getObject()?.fHistogram; }
102978
102979
102980
+ /** @summary Return true if histogram not present or has dummy ranges (for requested axis) */
102981
+ isDummyHistogram(check_axis) {
102982
+ const histo = this.getHistogram();
102983
+ if (!histo)
102984
+ return true;
102985
+
102986
+ let is_normal = false;
102987
+ if (check_axis !== 'y')
102988
+ is_normal ||= (histo.fXaxis.fXmin !== 0.0011) || (histo.fXaxis.fXmax !== 1.1);
102989
+
102990
+ if (check_axis !== 'x') {
102991
+ is_normal ||= (histo.fYaxis.fXmin !== 0.0011) || (histo.fYaxis.fXmax !== 1.1) ||
102992
+ (histo.fMinimum !== 0.0011) || (histo.fMaximum !== 1.1);
102993
+ }
102994
+
102995
+ return !is_normal;
102996
+ }
102997
+
102979
102998
/** @summary Set histogram object to graph */
102980
102999
setHistogram(histo) {
102981
103000
const obj = this.getObject();
@@ -103293,7 +103312,7 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
103293
103312
histo.fBits |= kNoStats;
103294
103313
this.#own_histogram = true;
103295
103314
this.setHistogram(histo);
103296
- } else if ((histo.fMaximum !== kNoZoom) && (histo.fMinimum !== kNoZoom)) {
103315
+ } else if ((histo.fMaximum !== kNoZoom) && (histo.fMinimum !== kNoZoom) && !this.isDummyHistogram('y') ) {
103297
103316
minimum = histo.fMinimum;
103298
103317
maximum = histo.fMaximum;
103299
103318
}
@@ -104156,7 +104175,7 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
104156
104175
* @desc if arg specified changes or toggles editable flag */
104157
104176
testEditable(arg) {
104158
104177
const obj = this.getGraph();
104159
- if (!obj)
104178
+ if (!isFunc( obj?.TestBit) )
104160
104179
return false;
104161
104180
if ((arg === 'toggle') || (arg !== undefined))
104162
104181
obj.SetBit(kNotEditable, !arg);
@@ -104572,8 +104591,9 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
104572
104591
/** @summary Draw axis histogram
104573
104592
* @private */
104574
104593
async drawAxisHisto() {
104575
- const need_histo = !this.getHistogram(),
104576
- histo = this.createHistogram(need_histo, need_histo);
104594
+ const set_x = this.isDummyHistogram('x'),
104595
+ set_y = this.isDummyHistogram('y'),
104596
+ histo = this.createHistogram(set_x, set_y);
104577
104597
return TH1Painter$2.draw(this.getDrawDom(), histo, this.getOptions().Axis);
104578
104598
}
104579
104599
@@ -104687,7 +104707,10 @@ class RTreeMapTooltip {
104687
104707
}
104688
104708
104689
104709
cleanup() {
104690
- if (this.tooltip !== null) document.body.removeChild(this.tooltip);
104710
+ if (this.tooltip !== null) {
104711
+ document.body.removeChild(this.tooltip);
104712
+ this.tooltip = null;
104713
+ }
104691
104714
}
104692
104715
104693
104716
createTooltip()
@@ -104726,7 +104749,7 @@ class RTreeMapTooltip {
104726
104749
104727
104750
hideTooltip()
104728
104751
{
104729
- if (this.tooltip)
104752
+ if (this.tooltip)
104730
104753
this.tooltip.style.opacity = '0';
104731
104754
}
104732
104755
@@ -104738,13 +104761,13 @@ class RTreeMapTooltip {
104738
104761
content += `<i>${(isLeaf ? 'Column' : 'Field')}</i><br>`;
104739
104762
content += `Size: ${this.painter.getDataStr(node.fSize)}<br>`;
104740
104763
104741
- if (isLeaf && node.fType !== undefined)
104764
+ if (isLeaf && node.fType !== undefined)
104742
104765
content += `Type: ${node.fType}<br>`;
104743
-
104744
104766
104745
- if (!isLeaf)
104767
+
104768
+ if (!isLeaf)
104746
104769
content += `Children: ${node.fNChildren}<br>`;
104747
-
104770
+
104748
104771
104749
104772
const obj = this.painter.getObject();
104750
104773
if (obj.fNodes && obj.fNodes.length > 0) {
@@ -173683,8 +173706,9 @@ class TScatterPainter extends TGraphPainter$1 {
173683
173706
/** @summary Draw axis histogram
173684
173707
* @private */
173685
173708
async drawAxisHisto() {
173686
- const need_histo = !this.getHistogram(),
173687
- histo = this.createHistogram(need_histo, need_histo);
173709
+ const set_x = this.isDummyHistogram('x'),
173710
+ set_y = this.isDummyHistogram('y'),
173711
+ histo = this.createHistogram(set_x, set_y);
173688
173712
return TH2Painter$2.draw(this.getDrawDom(), histo, this.getOptions().Axis + ';IGNORE_PALETTE');
173689
173713
}
173690
173714
0 commit comments