Skip to content

Is it possible to rotate FontAwesome icons with visNetwork? #465

@gilliganondata

Description

@gilliganondata

I have a specific need for a fa-square (f0c8) to be rotated 45 degrees, and I have been unable to make that happen.

I'm starting to think that the only manipulations to an icon available are: code (the icon), size, and color.

I'm trying to do the definition within the nodes, and I can get those basic attributes working fine, but I've had no luck getting the rotate functionality to work. Much of the documentation (including https://docs.fontawesome.com/web/style/rotate) speaks to rotating via CSS, but, since the visNetwork output is a rendered canvas, that doesn't seem to work.

I was hoping that I could add something like:

icon.transform = "rotate-45"

or

icon.rotate = "45deg"

But neither of those has any effect. Nor does adding rotation details (or any formatting) to the CSS (which I think makes sense).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions