Skip to content

Be able to set a property (like attr.fill) of an attribute based on the data #76

@melalj

Description

@melalj

We would like to set a color of a marker based on the data.
For example:

.map({
  markers: {
    attr: {
      fill: function(d) {
        if (d.status === 'online') return 'green';
        if (d.status === 'pending') return 'orange';
        if (d.status === 'offline') return 'red';
        return 'gray';
    }
  }
})

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions