在SenchaTouch中使用图表

问题描述 投票:0回答:3

我开始使用SenchaTouch,我喜欢它;我真的很希望能够在SenchaTouch应用程序中显示交互式图表(例如,向下钻取:当用户点击图表栏,捕获事件并显示另一个图表时)。

这可能吗?

charts sencha-touch
3个回答
5
投票
中显示交互式图表(例如,下钻:当用户点击图表栏时,捕获事件并显示另一个图表)。

您已经知道,Sencha Touch是面向移动设备的,因此,如果您在iPhone / iPad移动应用程序中使用Flash,则它将不起作用。因此,我真的建议您使用Raphaël javascript Charts。Sencha Team已经在新的Ext 4版本中使用了它,我很高兴甚至在下一个Sencha Touch版本中也将正式使用它。

我向您发布了一个简单的示例,向您展示了如何在面板主体内初始化拉斐尔图表:

var myPanel = new Ext.Panel({
fullscreen: true,
html: 'The tabs above are also sortable.<br />(tap and hold)<br/>' +
    '<div id="raphaelChart"></div>',
listeners: {
    afterrender: function(){
        //Let's create the Raphael chart
        var set = Raphael(['raphaelChart', 320, 200, {
            type: "rect",
            x: 10,
            y: 10,
            width: 25,
            height: 25,
            stroke: "#f00"
        },{
            type: "text",
            x: 70,
            y: 50,
            text: "This is a Raphael Example"
        }]);
    }
}

});

希望这会有所帮助。


0
投票

您可以尝试打开Flash图表http://teethgrinder.co.uk/open-flash-chart-2/

这些非常易于使用和交互。


0
投票

尝试一下:

http://code.google.com/p/oppo-touching/

这使得Extcha JS 4中的图表可用于Sencha Touch!

© www.soinside.com 2019 - 2024. All rights reserved.