Rally 在App SDK 2.0中使用新数据更新图表

Rally 在App SDK 2.0中使用新数据更新图表,rally,Rally,我正在使用图表来可视化TimeboxScopedApp中的数据,我希望在范围更改时更新数据。使用remove()然后按所述重新绘制图表的更为暴力的方法给我留下了一个覆盖的“加载…”掩码,但在其他方面也有效。使用Highchart nativeredraw()方法的自然方法是我的首选,只是我不知道如何访问实际的Highchart对象,而不知道如何访问App SDK包装器 以下是代码的相关部分: var chart = Ext.getCmp('componentQualityChart'); if

我正在使用图表来可视化
TimeboxScopedApp
中的数据,我希望在范围更改时更新数据。使用
remove()
然后按所述重新绘制图表的更为暴力的方法给我留下了一个覆盖的“加载…”掩码,但在其他方面也有效。使用Highchart native
redraw()
方法的自然方法是我的首选,只是我不知道如何访问实际的Highchart对象,而不知道如何访问App SDK包装器

以下是代码的相关部分:

var chart = Ext.getCmp('componentQualityChart');
if (chart) {
    var chartCfg = chart.getChartConfig();
    chartCfg.xAxis.categories = components;
    chart.setChartConfig(chartCfg);
    chart.setChartData(data);
    chart.redraw(); // this doesn't work with the wrapper object
} else { // draw chart for the first time
如何使用新数据重新绘制图表?

假设图表(componentQualityChart)是
Rally.ui.chart.chart
的一个实例,您可以访问HighCharts实例,如下所示:

var highcharts = chart.down('highchart').chart;

// Now you have access to the normal highcharts interface, so
// you could change the xAxis
highcharts.xAxis[0].setCategories([...], true);

// Or you could change the series data
highcharts.series[0].data.push({ ... });  //Add a new data point

// Or pretty much anything else highcharts lets you do
使用_unmask()删除覆盖的“加载..”掩码


你能告诉我希哈特的目标是什么吗?或者,给出一个JSFIDLE示例?不幸的是,对我来说,它不能像图表一样工作。down('highchart')。图表是空的。
if (this.down('#myChart')) {
    this.remove('myChart');
}
 this.add(
                    {
                        xtype: 'rallychart',
                        height: 400,
                        itemId: 'myChart',
                        chartConfig: {
                            //....
                        },            
                        chartData: {
                            categories: scheduleStateGroups, 
                            series: [ 
                                {   
                                    //...
                                }
                            ]
                        }
                    }
                );
        this.down('#myChart')._unmask();