Skip to content
This repository was archived by the owner on Mar 17, 2020. It is now read-only.
This repository was archived by the owner on Mar 17, 2020. It is now read-only.

Can't use function in d3.tip.attr() #174

Closed
@neuquen

Description

@neuquen

I'd like to style two separate tooltips, depending on the data, so I want to pass in a function, but it doesn't look like that is currently supported.

I'm trying to do the below:

d3.tip()
  .attr("class", function(d) {
    if(d.value === true) {
      return "class1";
    } else {
      return "class2";
  }
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions