nbhatr7hiy
New Member
I am trying to scale my bars, so that none of them look abnormally large, are go out of scope. And I was able to accomplish this partly. My problem comes in when I try to add data before I try to update current data, i.e. If I evoke addData before clickEvent, the rendering doesn't get scaled. Even after I repeatedly add data. It will only scale once I evoke the clickEvent function, and after that it scales every time it is rendered.I am not sure, what I have been doing wrong, so any help would be appreciated.Here's the jsfiddle link:http://jsfiddle.net/NkkDC/4/And here are the functions:\[code\]function clickEvent(d, i) { var op = prompt("Please enter the value", d); data = parseInt(op, 10); render();}; function addData() { var op = prompt("Please enter the value", ""); var len = data.length; data[len] = op; render();}; \[/code\]In jsfiddle, my button doesn't seem to be prompting for a box when it is clicked. Help with that would be appreciated too.Thank you!