Rally Map Update

I have a Rally SDK 2.0p5 application that displays a chart. When the user selects the option, the data will be updated, and I would like to update the chart. But instead of redrawing, he will put a new chart at the bottom. What is the correct syntax?

// Configure and Add the chart this.add( { xtype: 'rallychart', height: 400, id: 'chart', chartConfig: { chart: { }, title: { text: 'My Chart', align: 'center' }, xAxis: [ { categories: ['M0','M1','M2','M3','M4','M5'], title: { text: 'Interval' } } ], yAxis: { title: { text: yText } }, series: [ { type: 'column', name: yText, data: mCount } ], plotOptions : { column: { color: '#F00' }, series : { animation : { duration : 2000, easing : 'swing' } } } } } ); 
0
source share
2 answers

You need to delete the first chart before adding a new one.

 redrawChart: function() { this.remove('#chart'); this.add({...}); } 
+1
source

Often it’s better to just update the chart in place. HighCharts is a graphics library included in the application SDK. HighCharts will even bring your changes to life. Cool!!! Look here for a list of methods that work on charts. You can add series, change data, change axis limits, control magnification, etc.

0
source

Source: https://habr.com/ru/post/1493744/


All Articles