Skip to content

Commit ba2544a

Browse files
authored
Merge pull request #42 from pfizer-opensource/baseline-fixes
Baseline fixes
2 parents c5986f6 + 5af1200 commit ba2544a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/graphs/moving-range/MovingRangeRenderer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ class MovingRangeRenderer extends ScatterplotRenderer {
1818
renderGraph(graphElementSelector) {
1919
this.drawSvg(graphElementSelector);
2020
this.drawAxes();
21-
this.computeGraphLimits();
2221
this.drawArea();
22+
this.computeGraphLimits();
2323
this.drawGraphLimits(this.y);
2424
this.setupMouseLeaveHandler();
2525
}

src/graphs/scatterplot/ScatterplotRenderer.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -603,13 +603,12 @@ class ScatterplotRenderer extends UIControlsRenderer {
603603
.attr('id', 'text-' + id)
604604
.style('font-size', '12px');
605605
}
606-
607-
lineEl.attr('y1', yScale(yValue)).attr('y2', yScale(yValue)).attr('stroke', color);
606+
lineEl.attr('y1', this.applyYScale(yScale, yValue)).attr('y2', this.applyYScale(yScale, yValue)).attr('stroke', color);
608607
if (text) {
609608
textEl
610609
.text(text)
611610
.attr('fill', color)
612-
.attr('y', yScale(yValue) - 4);
611+
.attr('y', this.applyYScale(yScale, yValue) - 4);
613612
// Measure text width
614613
const textWidth = this.#getTextWidth(text, '12px');
615614
const adjustedX = this.width - textWidth;

0 commit comments

Comments
 (0)