@Rashe wrote:
I use highcharts and I wanted to load data on legend change. so I use on click event in component, than I send action to controller where I get data. And now I need to send it back, to user this.setData(BACKDATA); function in component. I do not want to refresh the chart, only redraw it. Or maybe it's better to get data from component?
Component:
events: { legendItemClick: function () { let chart = this; self.triggerAction({ action:'changeMetric', actionContext: chart.name }); this.setData(BACKDATA); }
Controller:
changeMetric(val){
let params = {Metric: "active_time"};
let promise = getStoreData(this.get('store'), 'comparetimeframe', params);
}Thanks
Posts: 2
Participants: 2