【问题标题】:Ionic 2 angular 2 Plotly.js issueIonic 2 angular 2 Plotly.js 问题
【发布时间】:2018-08-05 11:57:32
【问题描述】:

我正在使用 ionic 2 和 angular 2。我安装了 npm plotly.js,当我使用“import * as Plotly from 'plotly.js/dist/plotly';”时并使用 Plotly.newPlot();它响应我空白屏幕没有任何错误。我该怎么办?

import * as Plotly from 'plotly.js/dist/plotly';
Plotly.newPlot();

【问题讨论】:

    标签: typescript ionic2


    【解决方案1】:

    如果您确实没有看到错误,请尝试检查您用于绘图的 html 元素。在离子卡内使用绘图时,我遇到了类似的问题,并且绘图的 div 最终高度为 0 px。 您可以将 div 的高度设置为 px insted of % 或手动设置卡片的高度来解决此问题。

    【讨论】:

      猜你喜欢
      • 2017-05-24
      • 2018-07-28
      • 1970-01-01
      • 2016-06-26
      • 1970-01-01
      • 1970-01-01
      • 2016-12-17
      • 1970-01-01
      • 2017-08-10
      相关资源
      最近更新 更多