jquery - Invalid dimensions for plot, width = 0, height = 400 inside of hidden tab -
i have error when insert charts in hidden tabs second, third, etc. here error:
invalid dimensions plot, width = 0, height = 400 in js/jquery.flot.min.js:6. i used bootstrap 2 , jquery:
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script> here libraries:
<script src="js/jquery.flot.min.js"></script> <script src="js/jquery.flot.pie.min.js"></script> <script src="js/jquery.flot.stack.js"></script> <script src="js/jquery.flot.resize.min.js"></script> and css:
#plotarea { max-width: none; height: 400px; } #pie { max-width: none; height: 400px; } #barmonth { max-width: none; height: 400px; } #baryear { max-width: none; height: 400px; } the div id of every chart(always change id chart need show, plotarea, pie, barmonth, baryear, etc):
<div id="plotarea"></div> and add style fix width error .ui-tabs .ui-tabs-hide { left: -10000px; visibility: hidden !important; }, chart doesn't draw charts inside of hidden tabs draw first tab in first view...can if there form fix it?
i use charisma template.
best regards!
well made it!
if have library <script src="js/jquery.flot.resize.min.js"></script>, need change inside of styles.css(the stylesheets file):
max-width: none; height: 400px; with this:
width: 100%; height: 400px; now charts resize in every screen.
Comments
Post a Comment