I have a d3 app with one HTML number input. Everything works as I want it to for the moment, except that the visualization doesn't appear in the browser until I actually click the number input up or down.
I tried setting the input with a value:
<input type="number" min="0" max="100" step="1" value="5" id="nMinutes">
I also tried this workaround:
var hack = document.getElementById("nMinutes");
hack.value = "22";
to no avail.
I am following this example: http://www.d3noob.org/2014/04/using-html-inputs-with-d3js.html
Here's the fiddle: http://jsfiddle.net/btsusu6v/3/ Note: I am using d3.csv in my actual app:
var dataset2
d3.csv("/assets/csv/mydata.csv", function(d) {
dataset2=d;
})
This is my first venture into D3 (and javascript for that matter), so all general recommendations about the app (and not 100% specific to the posted question) are welcome and appreciated.