I'm using Ember-CLI and ember-highcharts to plot some data. The library works fine with test data but fails when I try to pull data from an API, so I believe that there might be some kind of race-condition going on. However, I can print the series from within my component just fine, so I'm uncertain why the highcharts component isn't listening for changes to chartData and updating accordingly.
Here's my assignment statement:
this.get('chartData')[0].data.setObjects(barItems);
And my charData element:
chartData: [{
name: 'Temperature',
type: 'column',
color: '#8fb1e8',
data: []
},
{
name: 'Humidity %',
type: 'line',
color: '#393a3d',
data: []
}],
The template this is all being used in:
<p id="res"></p>
<div class="graph">
</div>
The chart does populate with data after navigating away, and then back to the page.
Any thoughts as to how to fix this or what I might be doing wrong?
Aucun commentaire:
Enregistrer un commentaire