Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/450.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何解决使用xtype:rallychart时StoreConfig、CalculatorType和CalculatorConfig出现的错误_Javascript_Charts_Rally - Fatal编程技术网

Javascript 如何解决使用xtype:rallychart时StoreConfig、CalculatorType和CalculatorConfig出现的错误

Javascript 如何解决使用xtype:rallychart时StoreConfig、CalculatorType和CalculatorConfig出现的错误,javascript,charts,rally,Javascript,Charts,Rally,我正在使用Rally App Builder解决Rally App的一个问题。这个应用程序的目的是在图表上绘制一些数据,以便于阅读。我使用的图表是xtype:rallychart 当此应用程序放在rally页面上时,它不会出现任何问题,但一旦我尝试使用rally app builder构建并运行该应用程序,我会遇到以下问题: 缺少必需的配置字段:storeConfig 缺少必需的配置字段:calculatorType 缺少必需的配置字段:calculatorConfig 您的请求需要访问您无权

我正在使用Rally App Builder解决Rally App的一个问题。这个应用程序的目的是在图表上绘制一些数据,以便于阅读。我使用的图表是
xtype:rallychart

当此应用程序放在rally页面上时,它不会出现任何问题,但一旦我尝试使用rally app builder构建并运行该应用程序,我会遇到以下问题:

  • 缺少必需的配置字段:storeConfig
  • 缺少必需的配置字段:calculatorType
  • 缺少必需的配置字段:calculatorConfig
  • 您的请求需要访问您无权访问的工作区或项目。请与订阅管理员联系以请求权限。
我按照特定的顺序得到这些错误,一次一个。这些错误不会出现在rally app builder中,它们只会在我尝试运行应用程序时出现。这些错误消息将显示图表的位置,控制台中唯一显示任何内容的错误是上面列出的最后一个错误。与权限相关的错误在输出控制台中显示以下错误:

Failed to load resource: the server responded with a status of 403 ()
在向图表声明中添加以下行时,前三个错误得到解决:

storeConfig: {
    find: {
        _TypeHierarchy: "HierarchicalRequirement" //This means User Story?
    }   
},
calculatorType: 'Rally.data.lookback.calculator.TimeSeriesCalculator',
calculatorConfig: {} ,
我的猜测是,最后一条与权限相关的错误消息具有误导性,并且错误在
storeConfig
calculatorType
calculatorConfig
属性中的某个位置

让我困惑的是,应用程序在rally网站上正常运行不需要上面列出的任何属性,但在使用rally app Builder运行时,出于某些原因需要这些属性

如果您能帮助解决此问题,我们将不胜感激。如果需要更多信息才能成功解决此问题,请告知我。我将在下面附上完整的图表声明:

this.chart = this.down('#chart').add( {
    storeConfig: {
        find: {
            _TypeHierarchy: "HierarchicalRequirement" //This means User Story?
        }   
    },
    calculatorType: 'Rally.data.lookback.calculator.TimeSeriesCalculator',
    calculatorConfig: {} ,
    xtype: 'rallychart',
    height: 400,
    series: [
    {
        type: 'line',
        dataIndex: 'CycleTime',
        name: 'Story Cycle Time',
        visible: true
    },
    {
        type: 'line',
        dataIndex: 'LeadTime',
        name: 'Story Lead Time',
        visible: false
    },

        ],
    store: snapshotStore,
    chartConfig: {
        chart: {
            marginRight: 10,
            marginBottom: 100,
            zoomType: 'xy',
            animation: {
                duration: 1500,
                easing: 'swing'
            }
        },
        title: {
            text: 'Story Cycle Time Control Chart',
            align: 'center'
        },
        xAxis: [
        {
            categories: myXAxis,
            labels: {
                enabled: false
            }
        }
            ],
        yAxis: {
            title: {
                text: 'Time (days)'
            },
            plotLines: [
            {
                value: 0,
                width: 1,
                color: '#808080'
            },
            {
                value: meanCycleTime,
                width: 2,
                color: '#808080',
                label: {
                    text: 'Mean Cycle Time',
                    align: 'left'
                }
            },
            {
                value: 14,
                width: 2,
                color: '#0083ff',
            label: {
                    text: 'Sprint Duration',
                    align: 'center'
                }
            },
            {
                value: 56,
                width: 2,
                color: '#0083ff',
                label: {
                text: 'PSI Duration',
                align: 'center'
                }
            },
            {
                value: UCLCycleTime,
                width: 1,
                color: '#FF0000',
                label: {
                    text: 'UCL',
                    align: 'left'
                }
            }
                ]
        },
        plotOptions: {
            column: {
                color: '#F00'
            },
            series: {
                animation: {
                    duration: 3000,
                    easing: 'swing'
                }
            }
        },
        tooltip: {
            formatter: function() {
                return this.x + ': ' + this.y;
            }
        }
    }
});

您可能需要签出此选项:

在SnapshotStore中,当您正在处理的项目中有从您没有权限的其他项目移动到该项目中的人工制品时,就会出现这种问题。snapshotstore尊重对工件进行更改时存在的权限

一个简单的测试,看看这是否是一个权限问题是让一个工作区管理员运行相同的应用程序。如果它能工作,那么它肯定是一个权限问题