Skip to content

Commit f363187

Browse files
committed
Fix - do not touch hist axis with custom labels #297
If custom labels are configured for the X axis, range should be calculated differently. For the moment just keep axis as is.
1 parent e2e872b commit f363187

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/hist2d/TGraphPainter.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,12 +340,12 @@ class TGraphPainter extends ObjectPainter {
340340

341341
setHistogramTitle(histo, this.getObject().fTitle);
342342

343-
if (set_x) {
343+
if (set_x && !histo.fXaxis.fLabels) {
344344
histo.fXaxis.fXmin = uxmin;
345345
histo.fXaxis.fXmax = uxmax;
346346
}
347347

348-
if (set_y) {
348+
if (set_y && !histo.fYaxis.fLabels) {
349349
histo.fYaxis.fXmin = Math.min(minimum0, minimum);
350350
histo.fYaxis.fXmax = Math.max(maximum0, maximum);
351351
histo.fMinimum = minimum;

0 commit comments

Comments
 (0)