Skip to content
This repository has been archived by the owner on Apr 5, 2023. It is now read-only.

Can't get ember-charts to work #140

Open
MarceloBorgesP opened this issue Dec 1, 2015 · 2 comments
Open

Can't get ember-charts to work #140

MarceloBorgesP opened this issue Dec 1, 2015 · 2 comments

Comments

@MarceloBorgesP
Copy link

Hey guys, I've been trying to use ember-charts for a while now, but I can't get it to work, I suppose it could be some sort of deprecation, but as I'm still learning ember I think I should report it.

This is my route:

import Ember from 'ember';

export default Ember.Route.extend({
  model: function() {
    return [
        {
            "time": d3.time.format('%Y-%m-%d').parse("2013-05-01"),
            "value": 40
        },
        {
            "time": d3.time.format('%Y-%m-%d').parse("2013-05-02"),
            "value": 80
        },
        {
            "time": d3.time.format('%Y-%m-%d').parse("2013-05-03"),
            "value": 120
        }
    ];
  }
});

And in my template, I've used:

<div class="chart-container">
  {{time-series-chart lineData=model}}
</div>

I'm using this example: #1 as a base, it's a bit old but I think it's still valid.

When I try to open the page, I'm getting this error in the console:

Uncaught Error: Assertion Failed: Depending on arrays using a dependent key ending with `@each` is no longer supported. Please refactor from `Ember.computed('_groupedBarData.@each', function() {});` to `Ember.computed('_groupedBarData.[]', function() {})`.

I know it would be better to ask for help on stackoverflow, but I'm wondering if it is not something wrong with ember-charts.

I don't know if it's something I'm doing wrong, if so, please tell me.

@mrosenberg
Copy link

You need to do a search and replace on '.@each' and replace with '.[]'. That will solve your problem until you NPM update.

@ptgamr
Copy link

ptgamr commented Aug 10, 2016

This is also preventing me to use this library. Please have a fix ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants