带有extjs3.3.1的谷歌图表没有给出输出

时间:2011-06-02 18:14:31

标签: google-chrome extjs google-maps-api-3

<html>

    <link rel="stylesheet" type="text/css" href="http://extjs.cachefly.net/ext-3.3.1/resources/css/ext-all.css"/>

    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.3.1/adapter/ext/ext-base.js"></script>

    <script type="text/javascript" src="http://extjs.cachefly.net/ext-3.3.1/ext-all-debug.js"></script>

    <script type="text/javascript" src="http://dev.sencha.com/playpen/google-visualization/GVisualizationPanel.js"></script>

     <script type="text/javascript" src="http://www.google.com/jsapi"></script>


<script type="text/javascript">


Ext.onReady(function() {

    var lineChartDs = new Ext.data.SimpleStore({

        fields: [

            {name: 'yr', type: 'string'}

            ,{name: 'sales', type: 'int'}

            ,{name: 'expenses', type: 'int'}

        ],

        data: [['2004',1000,400],['2005',1170,460],['2006',860,580],['2007',1030,540]]

    });

    var lineChart1 = new Ext.ux.GVisualizationPanel({

        id: 'lineChart',

        visualizationPkg: 'linechart',

        title: 'Company Performance Sample',

        store: lineChartDs,

        columns: [

            {dataIndex: 'yr', label: 'Year'}

            ,{dataIndex: 'sales', label: 'Sales'}

            ,{dataIndex: 'expenses', label: 'Expenses'}

        ]

    })

    new Ext.Viewport({

        layout: 'fit',

        items: [lineChart1]

    });

});




</script>

1 个答案:

答案 0 :(得分:0)

GVisualizationPanel.js文件存在问题,在第23行进行更改

tbl.addColumn(转换[f.type.type],c.label || c,id);

之后使用extjs 3.3.1