Charts Resizing themselves
-
I am using google visualizer alongside some show/hide code to display 3 different charts at the same time. However, the 2 of the 3 charts are resizing themselves (weekly and monthly) when they should be all the same size.
Howe can I fix this? I use visualizer with a bit of added code.Function code added to header file:
<script> var divs = ["Daily", "Weekly", "Monthly"]; var visibleDivId = null; function toggleVisibility(divId) { if(visibleDivId === divId) { visibleDivId = divId; } else { visibleDivId = divId; } hideNonVisibleDivs(); } function hideNonVisibleDivs() { var i, divId, div; for(i = 0; i < divs.length; i++) { divId = divs[i]; div = document.getElementById(divId); if(visibleDivId === divId) { div.style.display = "block"; } else { div.style.display = "none"; } } } </script>
Code in text tab of page editor:
<div class="inner_div"> <div id="Daily">[visualizer id="431"]</div> <div id="Weekly" style="display: none;">[visualizer id="430"]</div> <div id="Monthly" style="display: none;">[visualizer id="429"]</div> </div> <div class="main_div"> <div class="buttons" align="center">   <button href="#" onclick="toggleVisibility('Daily');">Daily</button> <button href="#" onclick="toggleVisibility('Weekly');">Weekly</button> <button href="#" onclick="toggleVisibility('Monthly');">Monthly</button> </div>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Charts Resizing themselves’ is closed to new replies.