@@ -12,7 +12,7 @@ const version_id = 'dev',
1212
1313/** @summary version date
1414 * @desc Release date in format day/month/year like '14/04/2022' */
15- version_date = '18 /09/2025',
15+ version_date = '22 /09/2025',
1616
1717/** @summary version id and date
1818 * @desc Produced by concatenation of {@link version_id} and {@link version_date}
@@ -1567,7 +1567,8 @@ function createHistogram(typename, nbinsx, nbinsy, nbinsz) {
15671567 * @desc Title may include axes titles, provided with ';' symbol like "Title;x;y;z" */
15681568
15691569function setHistogramTitle(histo, title) {
1570- if (!histo) return;
1570+ if (!histo || !isStr(title))
1571+ return;
15711572 if (title.indexOf(';') < 0)
15721573 histo.fTitle = title;
15731574 else {
@@ -102976,6 +102977,24 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
102976102977 /** @summary Return histogram object used for axis drawings */
102977102978 getHistogram() { return this.getObject()?.fHistogram; }
102978102979
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+
102979102998 /** @summary Set histogram object to graph */
102980102999 setHistogram(histo) {
102981103000 const obj = this.getObject();
@@ -103293,7 +103312,7 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
103293103312 histo.fBits |= kNoStats;
103294103313 this.#own_histogram = true;
103295103314 this.setHistogram(histo);
103296- } else if ((histo.fMaximum !== kNoZoom) && (histo.fMinimum !== kNoZoom)) {
103315+ } else if ((histo.fMaximum !== kNoZoom) && (histo.fMinimum !== kNoZoom) && !this.isDummyHistogram('y') ) {
103297103316 minimum = histo.fMinimum;
103298103317 maximum = histo.fMaximum;
103299103318 }
@@ -104156,7 +104175,7 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
104156104175 * @desc if arg specified changes or toggles editable flag */
104157104176 testEditable(arg) {
104158104177 const obj = this.getGraph();
104159- if (!obj)
104178+ if (!isFunc( obj?.TestBit) )
104160104179 return false;
104161104180 if ((arg === 'toggle') || (arg !== undefined))
104162104181 obj.SetBit(kNotEditable, !arg);
@@ -104572,8 +104591,9 @@ let TGraphPainter$1 = class TGraphPainter extends ObjectPainter {
104572104591 /** @summary Draw axis histogram
104573104592 * @private */
104574104593 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);
104577104597 return TH1Painter$2.draw(this.getDrawDom(), histo, this.getOptions().Axis);
104578104598 }
104579104599
@@ -104687,7 +104707,10 @@ class RTreeMapTooltip {
104687104707 }
104688104708
104689104709 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+ }
104691104714 }
104692104715
104693104716 createTooltip()
@@ -104726,7 +104749,7 @@ class RTreeMapTooltip {
104726104749
104727104750 hideTooltip()
104728104751 {
104729- if (this.tooltip)
104752+ if (this.tooltip)
104730104753 this.tooltip.style.opacity = '0';
104731104754 }
104732104755
@@ -104738,13 +104761,13 @@ class RTreeMapTooltip {
104738104761 content += `<i>${(isLeaf ? 'Column' : 'Field')}</i><br>`;
104739104762 content += `Size: ${this.painter.getDataStr(node.fSize)}<br>`;
104740104763
104741- if (isLeaf && node.fType !== undefined)
104764+ if (isLeaf && node.fType !== undefined)
104742104765 content += `Type: ${node.fType}<br>`;
104743-
104744104766
104745- if (!isLeaf)
104767+
104768+ if (!isLeaf)
104746104769 content += `Children: ${node.fNChildren}<br>`;
104747-
104770+
104748104771
104749104772 const obj = this.painter.getObject();
104750104773 if (obj.fNodes && obj.fNodes.length > 0) {
@@ -173683,8 +173706,9 @@ class TScatterPainter extends TGraphPainter$1 {
173683173706 /** @summary Draw axis histogram
173684173707 * @private */
173685173708 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);
173688173712 return TH2Painter$2.draw(this.getDrawDom(), histo, this.getOptions().Axis + ';IGNORE_PALETTE');
173689173713 }
173690173714
0 commit comments