Skip to content

Cluster labels are not visible when cluster has fill color #175

@dnfeitosa

Description

@dnfeitosa

The cluster demo page has labels configured for each node group, but it is not visible due the to group fill color:

g.setNode('group', {label: 'Group', clusterLabelPos: 'top', style: 'fill: #d3d7e8'});
g.setNode('top_group', {label: 'Top Group', clusterLabelPos: 'bottom', style: 'fill: #ffd47f'});
g.setNode('bottom_group', {label: 'Bottom Group', style: 'fill: #5f9488'});

image

It seems the node order is playing some role on how the elements are shown. I was able to get it to be visible by inspecting and manually editing the generated svg and inverting the rect/g.label element positions:

<g class="cluster" transform="translate(283.0234375,223)" style="opacity: 1;">
  <rect style="fill: #d3d7e8" width="435.296875" height="273" x="-217.6484375" y="-136.5"></rect>
  <g class="label">
    <g transform="translate(-19.0625,-136.5)"><text><tspan xml:space="preserve" dy="1em" x="1">Group</tspan></text></g>
  </g>
</g>

image

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