在打开浏览器检查窗口或调整浏览器大小之前,dygraphs div不可见

编程入门 行业动态 更新时间:2024-10-24 08:23:03
本文介绍了在打开浏览器检查窗口或调整浏览器大小之前,dygraphs div不可见的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这困扰了我一个星期,所以我不得不来. (请原谅URL,这是一个开发服务器). www.stagestudio.ua/shutter_stat/wiev_base.php ?cat = 34

This has plagued me for a week, so I had to come to SO. (Forgive the URL, it's a dev server). www.stagestudio.ua/shutter_stat/wiev_base.php?cat=34

当我单击照片时,应该出现带有折线图的弹出窗口,但实际上折线图不可见.仅在调整窗口大小或打开浏览器检查窗口之后,该窗口才可见.

when I click on the photo the popup with linechart should appear but in fact the linechart is non visible. It can be visible only after resize the window or open browser inspection window.

我该如何解决?

此方法无效<script> var graph = new Dygraph(document.getElementById("graphPanel"), "temperatures.csv", { animatedZooms: true }); $(document).ready(function () { graph.resize(800, 500) }); </scrip>

This method dont work <script> var graph = new Dygraph(document.getElementById("graphPanel"), "temperatures.csv", { animatedZooms: true }); $(document).ready(function () { graph.resize(800, 500) }); </scrip>

推荐答案

// These will be zero if the dygraph's div is hidden. In that case, // use the user-specified attributes if present. If not, use zero // and assume the user will call resize to fix things later. this.width_ = div.clientWidth || attrs.width || 440; this.height_ = div.clientHeight || attrs.height ||320;

更多推荐

在打开浏览器检查窗口或调整浏览器大小之前,dygraphs div不可见

本文发布于:2023-10-08 01:50:41,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1471167.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:浏览器   大小   窗口   打开浏览器   div

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!