Updating a chart with new data in App SDK 2.0

此生再无相见时 提交于 2019-12-01 18:48:05

Assuming chart (componentQualityChart) is an instance of Rally.ui.chart.Chart, you can access the HighCharts instance like this:

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

Using _unmask() removes the overlaid "Loading.." mask

if (this.down('#myChart')) {
    this.remove('myChart');
}
 this.add(
                    {
                        xtype: 'rallychart',
                        height: 400,
                        itemId: 'myChart',
                        chartConfig: {
                            //....
                        },            
                        chartData: {
                            categories: scheduleStateGroups, 
                            series: [ 
                                {   
                                    //...
                                }
                            ]
                        }
                    }
                );
        this.down('#myChart')._unmask();
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!