Skip to content

Accessing additional fields on data #90

@gaurav5430

Description

@gaurav5430

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions