If you want to adjust the height of an element using JavaScript, you can do something like this:
function changeHeight(elementId) {
document.getElementById(elementId).style.height = "200px";
}
<button type="button" onClick="changeHeight('chartdiv');"> Click Me! </button>
However, if you have multiple elements with the same id and buttons assigned to them, clicking on one button will still affect all elements. Is there a way to create a more general method that can be applied to any element?