Skip to content

Commit

Permalink
Baseline fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ClaudiaGivan committed Oct 10, 2024
1 parent c5986f6 commit 202b6d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/graphs/moving-range/MovingRangeRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ class MovingRangeRenderer extends ScatterplotRenderer {
renderGraph(graphElementSelector) {
this.drawSvg(graphElementSelector);
this.drawAxes();
this.computeGraphLimits();
this.drawArea();
this.computeGraphLimits();
this.drawGraphLimits(this.y);
this.setupMouseLeaveHandler();
}
Expand Down
5 changes: 2 additions & 3 deletions src/graphs/scatterplot/ScatterplotRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,13 +603,12 @@ class ScatterplotRenderer extends UIControlsRenderer {
.attr('id', 'text-' + id)
.style('font-size', '12px');
}

lineEl.attr('y1', yScale(yValue)).attr('y2', yScale(yValue)).attr('stroke', color);
lineEl.attr('y1', this.applyYScale(yScale,yValue)).attr('y2', this.applyYScale(yScale,yValue)).attr('stroke', color);
if (text) {
textEl
.text(text)
.attr('fill', color)
.attr('y', yScale(yValue) - 4);
.attr('y', this.applyYScale(yScale,yValue)-4);
// Measure text width
const textWidth = this.#getTextWidth(text, '12px');
const adjustedX = this.width - textWidth;
Expand Down

0 comments on commit 202b6d9

Please sign in to comment.