Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dnfeitosa opened this issue Jun 6, 2015 · 1 comment
Closed

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

dnfeitosa opened this issue Jun 6, 2015 · 1 comment

Comments

@dnfeitosa
Copy link

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

balneaves added a commit to balneaves/dagre-d3 that referenced this issue Jul 1, 2015
cpettitt added a commit that referenced this issue Jul 4, 2015
Changed label ordering to show cluster labels #175
@cpettitt
Copy link
Collaborator

cpettitt commented Jul 4, 2015

This was fixed by salerth in #180. It will show up in v0.4.9. Thanks @salerth!

@cpettitt cpettitt closed this as completed Jul 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants