【问题标题】:ExtJS 5 Charts: Chart works in fiddle but not in applicationExtJS 5 图表:图表在小提琴中工作,但在应用程序中不起作用
【发布时间】:2014-12-27 18:18:42
【问题描述】:

我制作的一个简单图表在 Sencha Fiddle (see here) 中运行良好,但无法在我的应用程序中运行。我在 Chrome 开发者工具中看到的错误是:

*Uncaught TypeError: Cannot read property 'get' of undefined* at ext-all.js:19

我加入了ext-charts.js 甚至Cartesian.js,看看这是否有帮助,但没有雪茄。

<script type="text/javascript" src="Components/Sencha/ext-all.js"></script>
<script type="text/javascript" src="Components/Sencha/packages/ext-charts/build/ext-charts.js"></script>
<script type="text/javascript" src="Components/Sencha/packages/ext-charts/src/chart/series/Cartesian.js"></script>

有人知道为什么会这样吗?

【问题讨论】:

    标签: extjs5 extjs-chart


    【解决方案1】:

    嗯,原来ext-charts 是 ExtJS 4 中的旧图表包,sencha-charts 是 ExtJS 5 中引入的新图表包。

    ExtJS 版本低于 5.0.1 的 Sencha Fiddle 不会呈现图表,因为缺少包。

    我的版本是 5.0.1,所以加载 sencha-charts 包解决了这个问题。

    【讨论】:

      猜你喜欢
      • 2019-12-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-12-12
      • 1970-01-01
      • 1970-01-01
      • 2018-01-08
      相关资源
      最近更新 更多