Skip to content

Commit

Permalink
feat: svg line for errorbar
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierSwaak committed Jul 14, 2024
1 parent 461d37e commit 70e09f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/assets/uncertainty/uncertainty.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ function updateCentre() {
var dx = Math.pow(x_square_sum, 0.5) / xs.length
var dy = Math.pow(y_square_sum, 0.5) / ys.length

const xbar = document.getElementById("bar");
const click_box = document.getElementById("click_box");
var rect = click_box.getBoundingClientRect();
xbar.x1.baseVal.value = dx;

const meanpoint = document.getElementById("mean_point");
meanpoint.style.left = x + "%";
meanpoint.style.top = y + "%";
Expand Down
11 changes: 9 additions & 2 deletions docs/mvc.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,18 @@ Het oorspronkelijke script dat je gebruikte voor je meting is steeds leger gewor
1. Gebruik het plan om je eigen code aan te passen en test dat het werkt.

<div style="overflow:hidden" width="100%">

<div class="border_zone">
<div id="click_box" onclick="addPoint(event)"><div class="dummy"></div></div>
<div id="click_box" onclick="addPoint(event)">
<div class="dummy"></div>
</div>
</div>

<div class="border_zone" id="right_box">
<div id="display_box"><div class="dummy"></div></div>
<div id="display_box">
<svg width="100%" preserveAspectRatio="none" style="display: block;" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<line id="bar" x1="0" y1="0" x2="100" y2="50" stroke="black" /></svg>
</div>
</div>

</div>

0 comments on commit 70e09f0

Please sign in to comment.