【问题标题】:Are Sencha Touch Charts 1 and Sencha Touch 2 incompatible?Sencha Touch Charts 1 和 Sencha Touch 2 不兼容吗?
【发布时间】:2012-03-07 13:40:11
【问题描述】:

Sencha Touch Charts 1 是否与 Sencha Touch 2 兼容?

例如

我希望这是在一个 html 中(../touch 是 Sencha Touch 2 版本):

<title>Simple Animation with Sprites</title>
<script type="text/javascript" src="../touch-charts/sencha-touch-debug.js"></script>
<script type="text/javascript" src="../touch-charts/touch-charts-debug.js"></script>
<script type="text/javascript" src="app.js"></script>

而app.js 包含:

Ext.application({
    name: 'Animation',
    requires: [
        'Ext.draw.Component'
    ],
    launch: function() {
        var titleVisible = false;

        var drawComponent = new Ext.draw.Component({
            items: [{
                type: 'circle',
                fill: '#EECC00',
                radius: 100,
                x: 200,
                y: 200
            }]
        });

        Ext.Viewport.add({
            xtype: 'panel',
            id: 'panel-container',
            fullscreen: true,
            layout: fit,
            items: [drawComponent]

        });

        drawComponent.surface.renderFrame();
    }
});

可能会给我一个圆圈。

相反,我在 touch-charts-debug.js 的第 339 行得到一个异常,表明 Ext.util.Observable 不存在。

这是否意味着 Charts 1 与 Touch 2 不兼容?

【问题讨论】:

    标签: sencha-touch-2 sencha-charts


    【解决方案1】:

    【讨论】:

    • 我已经编辑了上面的代码,所以它适用于这个版本。请注意,有必要提取与图表 beta 捆绑在一起的 sencha touch 2 的副本 - 否则会出现异常。此外,虽然此代码有效,但绘图指南中的示例无法生成图像。
    【解决方案2】:

    不,它们不兼容。

    Sencha 表示,Sencha Touch 2 Charts 的测试版将在几周内推出。

    【讨论】:

    • 好的,谢谢 - Sencha Touch 1 下载似乎已从 Sencha 网站上消失,因此 Touch Charts 处于不确定状态 - 您无法将它们与可用版本一起使用。
    【解决方案3】:

    Sencha Touch 2.1 Beta 现已推出,支持图表

    这里是链接:http://dev.sencha.com/deploy/sencha-touch-2.1.0-b2.zip

    发行说明:http://dev.sencha.com/deploy/sencha-touch-2.1.0-b2/release-notes.html

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-08
      • 1970-01-01
      • 1970-01-01
      • 2014-02-06
      • 2013-05-23
      • 1970-01-01
      • 1970-01-01
      • 2013-08-21
      相关资源
      最近更新 更多