Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing additional fields on data #90

Open
gaurav5430 opened this issue Mar 1, 2016 · 0 comments
Open

Accessing additional fields on data #90

gaurav5430 opened this issue Mar 1, 2016 · 0 comments
Labels

Comments

@gaurav5430
Copy link

I am not able to access additional fields that i specify on my word cloud data, except for size and text.

I am calling my draw() function on the "end" event.

I think this is due to the fact that you are mapping :

data = words.map(function(d, i) {
        return {
          text: text.call(this, d, i),
          font: font.call(this, d, i),
          rotate: rotate.call(this, d, i),
          size: ~~fontSize.call(this, d, i),
          padding: cloudPadding.call(this, d, i)
        };

and then using

d = data[i];
tags.push(d);

event.end(tags, bounds);

so, only these 5 fields are returned after "end" event.

Am i missing something here ?

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

No branches or pull requests

2 participants