图表宽度问题 [英] Issue in width of the chart
问题描述
I"m working on a project in which the design is similar to that of the one in the fiddle.
左侧侧边导航栏有切换选项,右侧有图表。
Side navigation of the left with toggle option and the chart on to the right side.
发生了什么是图表响应是真棒,它是完美的,当我调整窗口大小。
What's happening is the chart responsiveness is awesome and it's perfect when I resize the window.
但在我的项目中,我有一个切换按钮切换左侧的导航
栏,这是工作正常。
But in the my project I have a toggle button to toggle the navigation
bar in the left side which is working fine.
当我隐藏导航栏。宽度变为屏幕的100%,但图表的宽度保持不变,除非我在窗口上执行一些操作,如调整大小。
When I hide the navigation bar. The div width becomes 100% of the screen but the width of the chart remains the same unless I do some action on the window like re-sizing.
注意:border给予div以指示 div 的宽度。 code>在翻转侧边栏。
Note : border given to the div to indicate the width of the div
on toggling the sidebar.
我在这里做了google但没有找到任何东西。
I did google on this but I found nothing.
如果任何面对这同样的问题,并找到任何解决方案。
If any of facing this same prob and found any solution. Please do help me out.
提前感谢。
推荐答案
$('#toggle-button').click(function() {
$('body').toggleClass('toggle-sidebar');
$(window).resize();
})
这篇关于图表宽度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!