Bootstrap carousel has conflict with morris.js chart?

☆樱花仙子☆ 提交于 2019-12-04 13:07:13
Mussser

This is the same issue as when using tabs. I would assume that the first graph shows up (if not, you may have multiple issues), but none of the graphs after that render once they are called upon in the carousel. The charts are drawn on document.ready, but since they are in a carousel they are not drawn because they are display:none until called upon.

This has been solved in another thread.

You'll have to put together a function that uses .redraw() See working fiddle here: http://jsfiddle.net/b3rgstrom/vbfzr/

You should be able to piece together something based off of what you find in the resources I provided. I hope this helps!

This is not the perfect solution but this will work. insert active class to <div class="item active" id="graphElemnt>

then remove that class "active"

<script type="text/javascript"> $(document).ready(function () { setTimeout(function () { $('#graphElemnt').removeClass("active"); //your code to be executed after 1 seconds }, 5000); }) </script>

keeping the active class only for one item remove the class from the rest.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!