Skip to content

Commit 88461aa

Browse files
committed
Fix - draw line for TGraphErrors ROOT-8131
For the TGraphErrors draw line around area if fill style is not configured but color is not null Make JSROOT nehaving as ROOT. See https://its.cern.ch/jira/browse/ROOT-8131
1 parent b8e05cd commit 88461aa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

modules/hist2d/TGraphPainter.mjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,11 +544,14 @@ class TGraphPainter extends ObjectPainter {
544544
}
545545

546546
// build upper part (in reverse direction)
547-
const path2 = buildSvgCurve(bins2, { line: options.EF < 2, cmd: 'L', qubic: true });
548-
549-
draw_g.append('svg:path')
547+
const path2 = buildSvgCurve(bins2, { line: options.EF < 2, cmd: 'L', qubic: true }),
548+
area = draw_g.append('svg:path')
550549
.attr('d', path1 + path2 + 'Z')
551550
.call(fillatt.func);
551+
552+
// Let behaves as ROOT - see JIRA ROOT-8131
553+
if (fillatt.empty() && fillatt.colorindx)
554+
area.style('stroke', this.getColor(fillatt.colorindx));
552555
if (main_block)
553556
this.draw_kind = 'lines';
554557
}

0 commit comments

Comments
 (0)