Skip to content

Conversation

@nsharrok
Copy link

@nsharrok nsharrok commented Sep 6, 2016

This PR is related to issue #38
An observer added to the pair-by.js helper allows for dynamic chart updating.
addon/helpers/pair-by.js

import Ember from 'ember';
import Helper from 'ember-helper';
import observer from 'ember-metal/observer';
const { assert } = Ember;

export default Helper.extend({
    compute(params) {
        assert('pair-by requires at least 2 arguments: key, data', params.length >= 2);
        let data = params.pop();
        this.set('array', data);
        assert('last argument must be an array of objects', Ember.isArray(data));
        let [...keys] = params; 

        return data.map((d) => {
            return keys.reduce((acc, k, index) => {
                acc[index] = d[k];
                return acc;
            }, []);
        });
    },
    contentDidChange: observer('array.[]', function() {
        this.recompute();
    })
});

ivanvanderbyl and others added 5 commits July 19, 2016 13:40
Adding explicit tick values support in the plaid-axis component.
Relates to issue #36.
move ember-cli-sass to devDependencies
@ivanvanderbyl
Copy link
Owner

This PR doesn't seem to contain the correct commits, the diff is only for some package changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants