【问题标题】:Issue with google chart is bootstrap Modal谷歌图表的问题是引导模式
【发布时间】:2016-09-14 16:21:11
【问题描述】:

当我尝试在 bootstrap modal 中添加 google 图表 时,它是 small size,我添加了一个 resize 功能在屏幕尺寸改变时重绘它。

仍然图表 onLoadsmall 但是当我调整窗口大小时,它占据了整个宽度。

当我在 普通 html 页面中添加 google chart 时,问题是 notcoming

Normal HTML PageBootstrap Modal Page

感谢任何类型的帮助:)

【问题讨论】:

  • 根据模态框的宽度在图表中设置width选项...
  • @WhiteHat :这样做不会使其响应:(
  • 使用resize事件——见redrawCharthere

标签: javascript html twitter-bootstrap google-visualization linechart


【解决方案1】:

覆盖引导程序的模态对话框宽度设置:

<div class="modal-dialog" style="width:100%">

...并在模式打开后调用您的调整大小函数:

$('#myModal').on('shown.bs.modal', function () {
    resize();
});

使用 Bootstrap 的modal events

【讨论】:

    猜你喜欢
    • 2015-01-23
    • 2013-03-21
    • 1970-01-01
    • 1970-01-01
    • 2018-05-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多