当使用xtype: rallychart时,如何解决StoreConfig, CalculatorType, CalculatorConfig的错误。

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

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

当这个应用放在拉力赛页面上时,它的工作没有任何问题,但一旦我尝试使用拉力赛应用生成器构建和运行该应用,我就会遇到以下问题。

  • Missing required configuration field: storeConfig
  • Missing required configuration field: calculatorType
  • Missing required configuration field: calculatorConfig
  • Your request requires access to a workspace or project for which you do not have permission. Contact your subscription administrator to request permission.

我得到了这些错误的具体顺序,一次一个。这些错误不会显示在rally应用构建器中,只有在我尝试运行应用后才会出现。这些错误信息会在图表应该出现的地方显示出来,而在控制台中唯一显示的错误就是上面列出的最后一个。与权限有关的错误会在输出控制台中显示以下错误。

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,calculatorTypecalculatorConfig 属性。

令我困惑的部分是,上面列出的属性都不是应用在拉力赛网站上正常运行所需要的,但在使用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;
            }
        }
    }
});
javascript charts rally
1个回答
1
投票

你可能需要查看这个选项。https:/rally1.rallydev.comdocsen-ussaasapps2.1docindex.html#!apiRally.data.lookback.SnapshotStore-cfg-removeUnauthorizedSnapshots。

对于SnapshotStore,当你正在工作的项目中的工件从其他项目中被移到你没有权限的项目中时,就会出现这种问题。Snapshotstore尊重在对工件进行更改时存在的权限。

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

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