Skip to content

view.add_representation(repr_type="label", labelType="text", labelText=...) #1047

@juliasubbotina

Description

@juliasubbotina

Hello,--
I am having an issue with labels representation.
My code below does not work if label type is "text". However it works just fine for other types of labels:


view[1].add_representation(repr_type="label", selection=".CA and  70 and :X", 
                           labelType="text", labelText=['ASP 70'],
                              color = "black", fontWeight="bold", radius=6,
                              showBackground = True, xOffset = 0.5 , zOffset =5)

I tries different options for labelText, nothing worked:

labelText= ['ASP 70'] # -- option 1
labelText= 'ASP 70' -- option 2

* @property {String[]} labelText - list of label strings, must set `labelType` to "text"
* to take effect

What would be the correct way to setup labelType="text" representation?

Similar issue was reported in #923

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