【问题标题】:extJS portal issueextJS 门户问题
【发布时间】:2012-03-21 10:12:36
【问题描述】:

我将它用于我当前的应用程序http://dev.sencha.com/deploy/ext-4.0.7-gpl/examples/portal/portal.html。我试图用条形图和饼图(如果在面板和窗口中工作)替换当前图表(在第三列中),但在控制台中出现“h 未定义”错误。我已经多次确认图表的每一行代码以找出任何错误但没有。请指导我.....非常感谢您的帮助。 我的 chartportlet 需要这个 "requires:["Ext.data.JsonStore","Ext.chart.*","Ext.layout.container.Fit"]"

这是我的 chartportlet 代码(第三列)

   xtype: 'chart',
        id: 'chartCmp',
        animate: true,
        store: Ext.create('Ext.data.JsonStore', {
    fields: ['year', 'comedy', 'action', 'drama', 'thriller'],
    data: [
            {year: 2005,  action: 23890000},
            {year: 2006,  action: 38900000},
            {year: 2007,  action: 50410000},
            {year: 2008,  action: 56070000}
          ]
}),
        shadow: true,
        legend: {
            position: 'right'
        },
        insetPadding: 60,
        theme: 'Base:gradients',
        series: [{
            type: 'pie',
            field: 'action',
            showInLegend: true,
            donut: false,

            highlight: {
              segment: {
                margin: 20
              }
            },
            label: {
                field: 'year',
                display: 'rotate',
                contrast: true,
                font: '18px Arial'
            }
        }]

【问题讨论】:

    标签: javascript extjs extjs4


    【解决方案1】:

    不要使用最小化的 ExtJS 文件进行开发。使用调试版本,您将获得比“h 未定义”更明智的错误消息。

    【讨论】:

    • 所以...调查一下这个错误来自哪个文件和函数。
    • ext-core.js,这是文件
    • 所以启动你的调试器,看看错误发生在 ext-core 的什么地方。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多