Updating a chart with new data in App SDK 2.0

前端 未结 2 649
没有蜡笔的小新
没有蜡笔的小新 2021-01-19 10:04

I am using a chart to visualize data in a TimeboxScopedApp, and I want to update the data when scope changes. The more brute-force approach of using remov

2条回答
  •  情歌与酒
    2021-01-19 10:34

    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
    

提交回复
热议问题